0

I am using a forms.FileField to have the user choose file to open. I need to know which path the user chose in addition to the filename. I can't seem to find that anyplace. I will be loading other files from the same path.

1 Answers1

2

The path on the client (the user's computer) is not sent.

You cannot load files from the same path - unless you have some client side code (like a java applet or flash application) that has proper security permissions to open files on the client's computer, then send the files to your server over a TCP connection - which you don't.

So in summary, the file path on the client's computer is not available when using file upload fields, using any server side language.

For more information:

  1. RFC 2388 (the specification)
  2. How to get the file path from html input form
  3. W3C Form Reference
Community
  • 1
  • 1
Burhan Khalid
  • 169,990
  • 18
  • 245
  • 284