Jump to content

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 )
and
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)?
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.