I need to upload images using javascript without user intervention

in Script development
Subscribe to I need to upload images using javascript without user intervention 5 posts, 4 voices



Bugler User
FirefoxWindows

Hi,

I know that browsers won't allow to enter data in a form field of type file.

Is there a way to upload files using javascript?
I mean upload files to a third party webserver.
I want to load a webpage from a server which asks for pics to be uploaded and I want to upload them automatically.

Thanks.

 
devnull69 Scriptwright
FirefoxWindows

You cannot upload a file from the local drive without any user interaction. But you can create a file "from scratch" and upload it. Do you want to upload a file from the local drive of the current machine or do you want to upload files that have been "manually assembled"?

 
Bugler User
FirefoxWindows

Hi.
thanksfor your answer.

I can't create it from scratch as it has to be a specific pic.
I can read it either from the pc or a server of mine but the pic has to be sent to a third party server using its upload form.

Thanks.

 
Jefferson Scher Scriptwright
FirefoxWindows

Firefox does have some security restrictions on the <input type="file"> control. However, there might be a way to make an exception by elevating privileges in a signed script or based on the domain (assuming you trust the site). Have never tried it myself.

 
Watilin Scriptwright
FirefoxX11

Hello !

It was once possible to access the filesystem using GM_xmlhttpRequest (see http://mozdev.org/pipermail/greasemonkey/2005-J... ), but it seems it was considered as a security issue. I guess this has been fixed, but I cannot check it up right now.

I think it's worth writing a small script to check it ;)