Jump to content


This topic is now archived and is closed to further replies.


Submitting Path info of a file without uploading it (via browsing to it w/ type="file")

Recommended Posts

hello all,
i am posting a form without enctype="multipart/form-data" on so i dont have to upload a file to get its path info. I was hoping you could browse to a filename and submit that String value to the database.

but i ran into resistance...
FF (1.5) only posts the filename not the full path (DVD1.avi not c:/DVDs/DVD1.avi )
In IE 6 submits the fullpath, but ... The user could write a path in without clicking on the default Browse button. If he does this, IE will bug out. the btn which submits the form gives a javascript error: 'Access is denied' where it does form.submit(), unless u use the Browse button to find a file. kinda confusing, cause then i thought IE needs a valid path... but if u browse and find a valid file like 'c:/DVDs/DVD1.avi', then add jibberish 'c:/DVDs/DVD1.aviXXX', it goes through with the submit(). however if u browse and then totally clear the textbox and write down invalid path, it will bug out. heh.

Anyway to just submit the filepath easily with a type="file" (with the option of manually writing it in also)?

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.