Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML form: file input from a url

I would like to allow my users to either upload a file from their computer, or give the url of a file to upload.

Is there a way I can use the HTML file input to achieve both of these? My django backend is easier if the file comes in the POST data.

like image 540
jsj Avatar asked May 21 '26 19:05

jsj


1 Answers

No, It is not possible to use the <input type="file" /> for both the purposes.

File input cannot process a string value.

like image 175
Arun P Johny Avatar answered May 23 '26 08:05

Arun P Johny



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!