Closed
Bug 532230
Opened 15 years ago
Closed 7 years ago
Firefox's data: URIs handler should support MIME parameters
Categories
(Firefox :: File Handling, defect)
Firefox
File Handling
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: yacoob, Unassigned)
References
Details
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
http://tools.ietf.org/html/rfc2397 describes data: scheme:
---8<----------------
dataurl := "data:" [ mediatype ] [ ";base64" ] "," data
mediatype := [ type "/" subtype ] *( ";" parameter )
data := *urlchar
parameter := attribute "=" value
where "urlchar" is imported from [RFC2396], and "type", "subtype",
"attribute" and "value" are the corresponding tokens from [RFC2045],
represented using URL escaped encoding of [RFC2396] as necessary.
---8<----------------
RFC2045 in turn, describes MIME parameters in more details. It would be useful to use 'content-disposition' and 'filename' parameters to influence FF's handling of such data: URI.
Example:
Entering this URL in location bar:
data:text/html;base64,VGhpcyBpcyBhIHRlc3QK
should result in displaying a page with 'This is a test'.
Entering:
data:text/html;content-disposition=attachment;base64,VGhpcyBpcyBhIHRlc3QK
should result in FF downloading a file containing the above content
and entering:
data:text/html;filename=yay.txt;content-disposition=attachment;base64,VGhpcyBpcyBhIHRlc3QK
should result in FF downloading a file called 'yay.txt', containing the above content.
Is there any reason not to support at least those two parameters? Libraries like jsPDF would be much more useful with that.
Reproducible: Always
Reporter | ||
Comment 1•15 years ago
|
||
Can we please get some assessment and comment about this bug? I'd like to know what are the chances that this is going to be implemented soon-ish.
Reporter | ||
Comment 2•15 years ago
|
||
For anyone who arrives here looking for a solution for the problem, http://www.downloadify.info/ is some sort of solution for that.
Comment 3•15 years ago
|
||
I suspect this will be implemented when someone picks it up. See also bug 548516. But exposing the disposition to internal consumers will also need API changes (which I think we've been thinking about anyway; there are existing bugs on it).
Status: UNCONFIRMED → NEW
Component: General → File Handling
Depends on: 548516
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → file-handling
Comment 4•14 years ago
|
||
This has also been discussed on the w3c mailing list: http://lists.w3.org/Archives/Public/uri/2010Feb/0058.html
FWIW, this is not a Mac OS-only issue.
Comment 5•13 years ago
|
||
Also, this is not a bug.
If we want to extend the data URI syntax, the right way is to write an Internet Draft that updates RFC 2397 and discuss that in the IETF.
Updated•13 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Updated•8 years ago
|
Product: Core → Firefox
Comment 6•7 years ago
|
||
I don't think we should extend data: URLs.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•