Bug 26221 - WebKit should expose File.mediaType so pages can detect if files are images
Summary: WebKit should expose File.mediaType so pages can detect if files are images
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 25906
  Show dependency treegraph
 
Reported: 2009-06-05 10:46 PDT by Eric Seidel (no email)
Modified: 2023-12-11 06:23 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2009-06-05 10:46:22 PDT
WebKit should expose File.mediaType so pages can detect if files are images

http://www.w3.org/TR/file-upload/#idl-if-File

This is related to the desire to be able to get preview images off of File objects: bug 25906.  Unless we specify a behavior in which you just pass a File object to an HTMLImageObject and have it draw (and it always draws some sort of icon) then we need a way to determine if there is image data in the file.  A MIME type would be one way.
Comment 1 Anne van Kesteren 2023-12-11 06:23:44 PST
File.prototype.type has been supported for ages.