Closed Bug 598857 Opened 15 years ago Closed 15 years ago

input element type file retains the selected file after a page refresh

Categories

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

x86_64
Windows 7
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: shivk, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6) Gecko/20100101 Firefox/4.0b6 Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6) Gecko/20100101 Firefox/4.0b6 Using XHR and the File API, I'm uploading a file The file uploads and everything works as expected, no problem there. However, when you refresh the page, the input element still has the file and so one can simply re-upload the file, without having to select the file again. Reproducible: Always Steps to Reproduce: 1. Create a form with an input type file element 2. Using JavaScript and XHR (File API/FormData) upload the file 3. Refresh the page Actual Results: You'll see the input element still has the file and you can upload the file again. Expected Results: The field should be cleared out so the user would be forced to select the file (or another file) again,
Other browsers that support this feature (Chrome and Safari) clear the field as expected.
Form control value restore is a feature. Use shift-reload to clear the value.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.