This question already has an answer here:
I have a bitmap file at a location C:/Demo/HM.bmp I want to upload this file using a single button or without using input type="file". In other words, as soon as I click on a button, I want the file to uploaded using the file location as given above instead of manually selecting the file from a window(which happens in case of input type="file"). Please Help.
Suggest a solution in Javascript.
You cannot do this from a web page.
Here is a rewritten WSH which may put you in the right direction. It has NOT been tested
Your server may have to allow PUT for this to work and the page has to be saved with extension .HTA and opened from harddisk, so it will NOT work from a web page
This cannot be done in JavaScript (thankfully).
It would represent a serious security hole in web browsers if it was possible for the website to inspect and automatically upload files from the user's local file system...