Search code examples
javascriptnode.jsuploaddrag-and-drop

Automatic file uploading via drag and drop interface from PC to a website?


I need to upload a picture from PC to a website that uses drag and drop interface. I am using Javascript to open the necessary link, set properties and click to the upload field. But then a file manager pops up with a window where I need to choose a file from my filesystem. I cannot use Javascript here anymore. How can I automatize this? Somehow I need to upload a picture and then click send button using javascript. P.S. I am not trying to implement drag and drop box, I need to use it.


Solution

  • You can use Puppeteer to simulate headless chrome and run your automation script

    How to upload file with JS/Puppeteer