Open
Bug 61855
Opened 24 years ago
Updated 2 years ago
Using byte-scanner to determine the mime-type of uploaded file if it's not known[form sub]
Categories
(Core :: DOM: Core & HTML, enhancement, P4)
Core
DOM: Core & HTML
Tracking
()
NEW
Future
People
(Reporter: bugzilla, Unassigned)
References
Details
This bug is a related bug from bug 59411:
If you upload a file that is of filetype "unknown", the file is currently set to
"application/octet-stream".
It could be nice if some kind of byte-scanning were used to determine the
mime-type if it's not known.
IE does this.
Updated•24 years ago
|
Target Milestone: --- → Future
Reporter | ||
Comment 2•23 years ago
|
||
RFE cleanup. RFE is already indicated by the Severity field...Sorry for the
spam!
Summary: RFE: using byte-scanner to determine the mime-type of uploaded file if it's not known → Using byte-scanner to determine the mime-type of uploaded file if it's not known
Updated•23 years ago
|
Summary: Using byte-scanner to determine the mime-type of uploaded file if it's not known → Using byte-scanner to determine the mime-type of uploaded file if it's not known[form sub]
Comment 4•23 years ago
|
||
If we end up using nsIRequest, then we could use existing functionality in
./netwerk/streamconv/converters/nsUnknownDecoder.cpp. Setting dependent on bug
114106 in case we go that route.
Depends on: 114106
Updated•22 years ago
|
Priority: P3 → P4
Comment 5•21 years ago
|
||
any news on that? On Un*x platforms the most files don't have extensions.
So Mozilla does always upload application/octet-stream. There are many
webinterfaces which don't allow to change the mime-type after upload for
the documents.
Comment 6•21 years ago
|
||
See ongoing discussion in netscape.public.mozilla.netlib
Comment 7•20 years ago
|
||
Short story: this is a question of how we should expose the functionality.
Several options:
1) Have a method that takes a buffer and returns a type (essentially expose
nsUnknownDecoder::DetermineContentType). Pros: simple. Cons: needs a
buffer.
2) Have a method that takes a rewindable stream and returns a type. Pros: also
pretty simple. Cons: needs a rewindble stream.
3) Have a method that takes a stream, returns a stream to read from (which
therefore has to wrap the other stream), and allows the type to be read off
from somewhere (or just returns it). Pros: don't need anything special.
cons: rather complicated.
In all methods, the nsIFile should get passed in in addition to the stream, so
that nsUnknownDecoder can just apply its usual algorithm.
biesi, darin, thoughts?
Updated•15 years ago
|
Assignee: alexsavulov → nobody
QA Contact: vladimire → form-submission
Assignee | ||
Updated•6 years ago
|
Component: HTML: Form Submission → 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
•