Closed Bug 181995 Opened 22 years ago Closed 22 years ago

File field does not check if file exists before submitting

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 82634

People

(Reporter: dmartensson, Assigned: alexsavulov)

Details

(Whiteboard: dupe me?)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021112 MultiZilla/v1.1.18 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021112 MultiZilla/v1.1.18 I do not know if this is a bug or intentional but here is the problem: When using a file field and typing the filename manualy, not using browse there is no check to see if file exists before submitting. This results in the browser sending an empty file. This behaviour is the same as IE but I can not se any reason for this. What I would like: 1. Either the browser should complain if the file does not exist. 2. There should be some way to catch this from script. (could possibly be an security issue, the first alternative whould be better. Reproducible: Always Steps to Reproduce: 1. Take any form containing a file field 2. Write an arbitrary filenam which should not match an existing file 3. Submit form Actual Results: Form is submittet containing an empty file Expected Results: I whould have liked mozilla to complain or trigger an event that could be cought. I can setup an server to test this if neseccary but before I take the time I wanted to know if this is by design in which case I have to stay with the current solution to check filesize on the server.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
duplicate?
Whiteboard: dupe me?
This was fixed the following way: - IF the entry is a valid filename that does not exist, we truncate to just filename (no directories) and treat it like input type=text. - IF the entry is an invalid filename, we treat it like input type=text. *** This bug has been marked as a duplicate of 82634 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.