In an html page I have input type=’text’ and a button
filename: [ ]
[PUSH]
The user goes and fills the filename with “C:\test.txt”
When the button is pushed, (onclick), I want to write some javascript to upload the file
(e.g.: c:\test.txt) and submit to the server.
Obviously the input type file would be hidden and programmatically edited.
is this doable or are there any limitations ?
The idea is that the user does not have to go and use the input type file and always go to the open dialog
You cannot manipulate the filename before upload. You must do this on the server. This is a security measure to prevent the browser from being able to upload arbitrary files.