Is there a way to programmatically set the name of a file to be uploaded from a web page? I suspect that browser security restrictions make this impossible, but I\'m hoping
You can get and set the value of HTMLInputElement.files. See this answer.
HTMLInputElement.files