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

\\u0000 cannot be converted to text error \\u0000 cannot be converted to text error

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

How to create @click on select menu in VueJS How to create @click on select menu in VueJS