0

I have a javascript interface in which I have a browse button to find and attach a file and then upload it to a different directory. Problem is that once I attach a file i don't get full directory path and file not being found during upload. I was able to adjust IE ver.10 settings to show a full path but not in FF ver.21. I understand this is a security issue that should be in place. How would I retrieve a full path using javascript in IE and FF. Sample code would be really helpful. Thanks in advance.

1 Answer 1

2

You do not need full file path from the client browser since it will have nothing to do with the uploaded destination on the server. Many browsers restrict full local path availability due to security concerns. IE will show full path if you add site to "Trusted Sites", but again there is no need for that.

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

15 Comments

I understand, but I need a full path for file to be found during upload. I don't need to show it on the application but need to get it in javascript code.
Full path is probably in some hidden field where i can retrieve it from.
If your code could see it - everybody could see it. But again FileUpload control does need full path since browser sends the actual physical file as a part of Response, you just need to read it with server-side code and act accordingly. And no, there is no hidden field, it is not stored anywhere at all. Browser just loads file and doesn't care about the path
@JS11 If you need the full path of a file uploaded from the client in order to handle the file server-side, your code is flawed and you need to re-think your design.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.