I’d like to upload a file from a client machine to my server. The user would have to specify the file to upload as I understand it, using a form that looks like:
<input type="file" name="datafile" size="40">
This pops up a native file picker, which is great. The problem I’m having is that it’s a real pain (for most users) to go looking around their machine for the file I’m interested in. Is there a way I can initialize the file picker with a path to make it more convenient for the user? Like I know some users will be on a windows machine, so I could prepopulate the picker by already sending them to the My Documents folder for example.
I don’t see how this is possible, just wondering if something like that exists,
Thank you
You can’t force values into a file input field. It would be a laughably big security hole if you could 🙂
The picker in a browser generally remembers where a user has last browsed, which is something your site can’t know anyway.