Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File-Upload via local file path

Is there a way for enabling file upload via file path?

The default HTML file upload control displays a disabled textbox and a button. Is it possible via JS or something to upload a file when the user pastes the path to the file into a textbox?

This webpage is within a corporate intranet.

like image 827
schlingel Avatar asked Oct 29 '25 13:10

schlingel


2 Answers

No, such thing is not possible in web application using ordinary HTML/JavaScript - period.

The one and only way for user to choose file is via the file dialog opened by clicking the browse button of the <input type="file" /> element.

The only shortcut possible is that JS can open the file dialog automatically, but still - that's the only way for user to choose what file to upload.

There are some small possibilities to do that within a trusted network. Not exactly the same, but still a very similar question: Local file access with javascript

like image 30
Sascha Galley Avatar answered Oct 31 '25 05:10

Sascha Galley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!