A
A
Alexander Borisovich2012-09-21 10:57:44
PHP
Alexander Borisovich, 2012-09-21 10:57:44

Is it possible to force javascript to add a file to the input file field?

You need to automate the attachment of photos in the field. Or create a new one with the specified address?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
J
Johann, 2012-09-21
@johann

it is forbidden. if it were possible, it would be a giant hole. any site could download any file from the computer without the knowledge of the user

S
Sergey, 2012-09-21
Protko @Fesor

Automate - bash + ssh, only selentium from the browser.
On JS you cannot implement it (for it is impossible).
The only worthy option: by domloaded from js, press on the file input with the multiple attribute, and then everything is as usual.

V
vaevictus, 2012-09-21
@vaevictus

It was possible through Visual basic, in IE6 (I don’t know how in older versions) - but this is for lovers of perversions. java-applet can access files on disk, but only after confirmation from the user.

A
alternativshik, 2012-09-21
@alternativshik

yes, download everything with a curl? Or is this not an option?

V
Vumik, 2012-09-21
@Vumik

A flash downloader or the less popular java applet solution can solve this problem, but only in terms of the number of files downloaded. That is, you can immediately select a pack and send it.
You will not be able to independently initiate access through the site opened in the browser, because the issue of security and it is taken into account at many levels from the browser itself to Flash, for example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question