Jump to content

Get full file path through Input type file

- - - - -

  • Please log in to reply
2 replies to this topic

#1
j.lai

j.lai

    Newbie

  • Members
  • PipPip
  • 21 posts
I want to get the file path instead of the file name using <input type="file"/>
I'm working on a school project and want the user to select a location to save a file.
I've googled this issue and went on many different sites but didn't find a solution.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
<input type="file"> can't do this. The reason is it is used for uploads, and the script on the server is responsible for deciding where to store the file. Do you really want to let a user store a file in C:\Windows\system32 on your server?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
You could do this using PHP, such as allowing them to upload to a select few locations.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users