JS Upload file to HTML File Element preserving the effects of a regular click JS Upload file to HTML File Element preserving the effects of a regular click

How can I use javascript to upload an image to a specific HTML file element (for example, the dropzone on images.google.com)?

I have tried doing

fileElement.files = [myFile];

But that just uploads my file to the specific HTML file element, without triggering the normal effect of uploading to that file element (for example, triggering the actual google search of the image)



from Stackoverflow

Comments

Popular posts from this blog

How can I get every LI element's innerHTML and display as string? How can I get every LI element's innerHTML and display as string?

Refresh page after clicking button (ok / cancel) Refresh page after clicking button (ok / cancel)

I am having trouble with this ajax timer it is not doing what I expect and does not execute I am having trouble with this ajax timer it is not doing what I expect and does not execute