views:

36

answers:

0

Hi! Can I use an <input type="file"> field with an (data)URL?

I would need something like this in an Greasemonkey-script, but it seems impossible. Or is there some way?

The only working alternative seems at the moment trying to write a proxy, which replaces the file-field with an text-field for an URL, so the proxy can download the file, and submit the form. But this is too complicated in contrast to a Greasemonkey-script.

I want to add to some sites a "select a preset image" at the position of the filechooser.

As JavaScript cannot access the disk to save an image and then select it for uploading again, it would need to be done by data-URL's or something like this.