0

Is it possible to pass all data from an uploader (file input tag) to another one? in javascript or jquery.

What I want to do is to load a file in one uploader and pass it to another one

Marky68
  • 95
  • 1
  • 8
  • I'm fairly certain this is not possible, but I have to wonder why you need this. Once you get the file in a JS variable, you can do whatever you like with it. Do you have a jQuery plugin attaching to a particular file input? – apsillers May 25 '12 at 07:08

2 Answers2

0

Due to security issues you have no access to the values of those tags.

Using File API however you can read the selected file into memory and the do any number of things with it.

You can resize an image to the size of a thumbnail and put it in the source of a new by base64 encoding it.

Mihai Stancu
  • 15,848
  • 2
  • 33
  • 51
0

No. It is not possible.

However, if you must. There are a few external components like flash's upload component of java applets that will give you the path.

nunespascal
  • 17,584
  • 2
  • 43
  • 46
  • In Java as well as Flash (AFAIK) using the "filepath" you read from the user inputed file in another user input does not grant you access to the file. – Mihai Stancu May 25 '12 at 07:18
  • The OS & Browser/Flash/Java mitigate you access rights to the files. And they all keep track of which user input was granted access to the file. Otherwise constructing a slew of user inputs with "/etc/passwd" or "/etc/shadow" or whatever, would be trivial. – Mihai Stancu May 25 '12 at 07:20