Open
Bug 449880
Opened 16 years ago
Updated 2 years ago
Implement mediaType for File object
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
NEW
People
(Reporter: dhtmlkitchen, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
703 bytes,
text/html
|
Details |
The File object is implemented in Firefox 3. It is currently a Working Draft: http://www.w3.org/TR/file-upload/ http://dev.w3.org/2006/webapi/FileUpload/publish/FileUpload.html Implemented differently in Firefox 3. http://developer.mozilla.org/en/docs/nsIDOMFile https://bugzilla.mozilla.org/show_bug.cgi?id=371432 The Firefox implementation should include a way to detect the mime-type, but doesn't. The File Upload WD includes a mediaType property of a File object. http://www.w3.org/TR/file-upload/ Working Draft: | File | readonly attribute DOMString fileName; | readonly attribute DOMString mediaType; | readonly attribute unsigned long fileSize; | DOMString getDataAsString() | raises(FileException); | DOMString getDataAsBase64() | raises(FileException); | DOMString getDataAsHexBinary() `------------------------------------------------------------ Notice that the methods are also different/differently named in Firefox. Firefox 3: | File | fileName | fileSize | | getAsBinary() | getAsDataURL() | getAsText() `------------------------------------------------------------ Having a mediaType can allow for faster notification of user errors. For example, for applications that wish to check to see if a file is a jpeg or png could do so without sending the (possibly large) file to the server.
I don't think we care about the fact that it differs from the 'spec' since it's a draft spec that seems to have died. But the use-case of being able to notify early seems useful though.
Updated•16 years ago
|
Component: File Handling → DOM
Product: Firefox → Core
QA Contact: file.handling → general
Version: 3.0 Branch → Trunk
Comment 2•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•