Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

Need full pathname from type=file, or alternative mechanism

I need to be able to put a pathname to an image file in a database. I've tried using:

<input type="file" ... />

to let the user browse to the file, but that only returns the filename, not the full path. Further research shows that this is a "security" feature and browsers do not return the full path.

Is there any way to do this with html/javascript? It will be impossible to get the full path to the image file without this ability.

btw - I know I can do this with IE by enabling the 'Security' setting "Include local directory path when uploading files to a server", so don't bother sending that as a solution. I'm looking for something non-browser dependent, if such a mechanism exists.
SOLUTION
Avatar of plusone3055
plusone3055
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark
Mark

ASKER

I figured out a workaround