Jump to content


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

  • Please log in to reply
No replies to this topic

#1 arianhojat

  • Members
  • PipPipPip
  • Advanced Member
  • 235 posts

Posted 14 June 2006 - 07:08 PM

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)?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users