Closed
Bug 450266
Opened 16 years ago
Closed 16 years ago
Path changed on file to upload to that of the path of the web page
Categories
(Firefox :: File Handling, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 405630
People
(Reporter: chris.forman, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.1; .NET CLR 3.5; ffco7) Gecko/2008070208 Firefox/3.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.1; .NET CLR 3.5; ffco7) Gecko/2008070208 Firefox/3.0.1 I'm trying to get the dimensions of an image before I allow it to be uploaded* but have encountered this problem. The JavaScript in the web page is supposed to return the width and height of the image file selected. If the file is "C:\uploads\derby-map.png" (for example) the call to "document.Upload.localName.value" returns "http://test1.nepsecure.co.uk/l/leisuredirectory/admin/derby-map.png" every time. This means that the calls to get the width and height will definitely fail as the image doesn't exist at that location. The web page displays an alert for the file it's trying to check followed by two more that should show the width and height. * When I hard code the local path to try and get the image dimensions that doesn't work anyway - but it doesn't work in IE7 either so I'm going to have to find a different way of solving my real problem. Reproducible: Always Steps to Reproduce: 1. Open the page 2. Select an image file from your hard drive 3. Click "Send" Actual Results: "http://test1.nepsecure.co.uk/l/leisuredirectory/admin/derby-map.png" Expected Results: "C:\uploads\derby-map.png"
Comment 1•16 years ago
|
||
You can not get the full path for file upload controls with Firefox3.x, you get only the filename for privacy reasons.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•16 years ago
|
||
It's not exactly a duplicate though. bug 405630 states that only the file name is returned whereas with this problem the path has been replaced by something else. I'm not going to bother reopening the bug though as the code doesn't work anyway.
Comment 3•16 years ago
|
||
You code will fail to get the path and use the filename as relative path with will result in that URL
You need to log in
before you can comment on or make changes to this bug.
Description
•