0

I want to get full path which user selected in file upload control. how can we do it.

3 Answers 3

1

You can't.

The file upload will send you the file, with the filename, but nothing else. Giving you the full path on the users computer is both a possible invasion of privacy and a possible security breach, so it is not allowed.

Sign up to request clarification or add additional context in comments.

Comments

0

I don't think you can do that for security reasons. This means you can get information about any user folder structure that uploads files to your web site.

Regards...

Comments

0

browser restrictions does not allow this, however there are some hints using javascript before submiting to achieve this

For instance

<asp:button onClientClick="document.getElementById('hiddenField1').value = document.getElementById('fileUpload1').value"  ... 

Then the path can be retrieved on server side via hiddenField1.Value

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.