views:

15

answers:

1

Hi. I want my php application to allow the user to select a file from their computer. I then want to store the file's path, but I don't want to upload the file.

With the <input type="file" />, the file is uploaded, which would take too long.

Is there a way to do this? Maybe if I change the input's type to text with jquery right before the form is sent? I could just let the user type the path, but that is not very convenient...

A: 

No. A server shouldn't need to care about file paths on the client machine. If you do, then you are doing something that browsers really were not designed to handle.

Not all browsers expose the path in the first place (because it doesn't matter).

David Dorward