How upload file to extrernal site?

  1. Load extrenal website in windowBrowser with js injection
  2. using javascript I’m click on and FileDialog oppened/
    How can I programmatically load an external website the file from your computer ?


Is this a question about Atom, the text editor, or Electron, the app framework?


it is about electron


Electron is based on Chromium, so basic browser API calls should generally work the same way. Since it also has Node built in, you can also get files with the fs module.


Thank you, but I want to programmatically insert a file in from external site (it is not my site and I can’t do it using the ways given above).


In the subject, you asked how to upload a file to an external site, not to get a file from one.

It probably depends what the site is.


Site is, i want open it in electron and upload photo there using js in electron


You’ll want to do it with the API.


Yes, I think it would have… But did not want to use the api, the goal was to emulate user actions.Are you sure that no more way to get about this behavior in electron ? (as in selenium webdriver ?


You could load the site and simulate click events.

#11 api does not provide methods for working with audio files =(

I can simulate click events for open file dialog for to select the file, but how can I, after opening the fileDialog to choose a file from my computer ?


I don’t know.


I am not sure this will work or not if you have free time just give a try, manually upload data and check what information is posted by front end to back end.
try to reconstruct that url and hit the URL.


var myimage_url = ‘"+encodeURI(myimage_url)+"&encoded_image=&image_content=&filename=&hl=en

This will do image search in google, without selecting /uploading image