firefox uploads files with wrong mimetype
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mozilla Firefox |
Invalid
|
High
|
|||
firefox (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: firefox
Using firefox 2.0.0.1 on Ubuntu edgy.
If I upload a PDF file to some site using firefox, the receiver gets the file and an associated mimetype of application/binary rather than the correct application/pdf
(btw, note that konqueror uploads the pdf file with the correct mimetype).
I do not know if the above is a problem with edgy firefox or with upstream firefox, but I suspect the first.
The bug seems minor, but is in fact critical to those needing to upload conference papers or journal articles to publishers' web sites. In fact, the latter often refuse the file if the file does not appear to be PDF.
John Vivirito (gnomefreak) wrote : | #1 |
Changed in firefox: | |
assignee: | nobody → mozillateam |
status: | Unconfirmed → Needs Info |
Sergio Callegari (callegar) wrote : Re: [Bug 84880] Re: firefox uploads files with wrong mimetype | #2 |
John Vivirito wrote:
> Can you please provide us with a link to the PDF you are trying to save?
>
> ** Changed in: firefox (Ubuntu)
> Assignee: (unassigned) => Mozilla Team
> Status: Unconfirmed => Needs Info
>
>
Actually, the problem exists for any PDF.
A couple of examples:
1) I am uploading a PDF paper to the www.epapers.org site, that manages
many conference submissions. The paper is rejected as the epapers site
thinks it is not PDF. If I do exactly the same operation with konqueror
it succeeds. Unfortunately here I cannot send you the PDF as it is a
still unpublished article.
2) I am uploading some PDF slides to our Dept. repository. Here the
site after receiving a file indicates the mime type of the received
file. If I submit with konqueror I get application/PDF, if I submit
with firefox, I don't. You can retreive any of these files at
http://
Thanks,
Sergio
Changed in firefox: | |
importance: | Undecided → Medium |
Changed in firefox: | |
assignee: | mozillateam → mozilla-bugs |
Rafa (rafae1-ramirez) wrote : | #3 |
I confirm the issue of wrong MIME type being sent by firefox.
I'm currently setting up an intranet server for a research group. I have installed a
PDF manager (Librarian) and am currently trying to populate the database. Upon
the upload of the PDF files, I was getting an error message for incorrect MIME type
of the files. I hacked the php code to find out what the sent MIME type was, and got:
application/binary instead of the expected application/pdf.
This results in the file not being recognized by the program as a PDF, thus failure
to upload on the site.
At first I thought it was a problem with my php.ini configuration, and tweaked all
I could find on the matter without results. Then I came across this bug description
and actually confirmed that it is likely to be a firefox issue, and not an
apache2/php/pdf or whatnot.
The PDF files upload without the shadow of a problem using konqueror.
My server configuration is:
Ubuntu 7.04 Feisty Fawn i386
Apache2
PHP5
Librarian PDF manager (http://
My client:
Ubuntu 7.04 Feisty Fawn i386
The web browser:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20061201
Firefox/2.0.0.3 (Ubuntu-feisty)
All PDF files tested came up with the wrong MIME using firefox, none have yet
given me problems using konqueror.
For many required to submit their work by uploading PDF files on servers that
use MIME type control, this issue might be more than an annoyance.
Alexander Sack (asac) wrote : | #4 |
do you still see this bug in up-to-date gutsy?
Sergio Callegari (callegar) wrote : | #5 |
Unfortunately I am not using the gibbon yet.
if there is any way to check the up-to-date firefox from the feisty fawn, I would be pleased to do so.
Sebastian Schulze (bascht) wrote : | #6 |
I am currently stuck with exactly the same problem, but using Firefox 3 / Ubuntu Hardy.
Uploading the File via Konqueror sends the mimetype "application/pdf".
Uploading exactly the same File via Firefox sends mimetype "application/
Could this probably be caused by a faulty extension?
Marlin Forbes (datashaman) wrote : | #7 |
I am having the same probems, using FireFox 3/ Ubuntu Hardy. Only my PDFs are registered as text/html, instead of application/pdf.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008061015 Firefox/3.0
WalterNicholls (walter-nic) wrote : | #8 |
I have a possible solution - look at mimeTypes.rdf (see below)
I can confirm this problem, and while trying to find a fix, I came across this bug. There are also numerous logged on bugzilla.
For the record: On Kubuntu Hardy, running under KDE3, Firefox version Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008071717 Firefox/3.0.1. Plenty of extensions none of which I think are relevant.
Uploading PDF attachments to PHPList (phplist.com), they come through as application/binary. Konqueror does it fine. This is a serious problem, because phplist does not provide a way to change the mime type of an attachment (except a direct database edit, ouch). I can't just use Konqueror because that doesn't support FCKEditor for rich text editing.
"file" command reports PDF document, version 1.3, /etc/mime.types and all that look ok.
HOWEVER I had ported my firefox profile across from a Windows machine, I don't know what happened to that there, but in my profile directory, mimeTypes.rdf contained this gem:
<
I've edited this to instead say:
<RDF:
Now file upload works.
Sergio Callegari (callegar) wrote : | #9 |
WalterNicholls wrote:
> I have a possible solution - look at mimeTypes.rdf (see below)
>
> I can confirm this problem, and while trying to find a fix, I came
> across this bug. There are also numerous logged on bugzilla.
>
> For the record: On Kubuntu Hardy, running under KDE3, Firefox version
> Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008071717
> Firefox/3.0.1. Plenty of extensions none of which I think are relevant.
>
> Uploading PDF attachments to PHPList (phplist.com), they come through as
> application/binary. Konqueror does it fine. This is a serious problem,
> because phplist does not provide a way to change the mime type of an
> attachment (except a direct database edit, ouch). I can't just use
> Konqueror because that doesn't support FCKEditor for rich text editing.
>
> "file" command reports PDF document, version 1.3, /etc/mime.types and
> all that look ok.
>
> HOWEVER I had ported my firefox profile across from a Windows machine, I
> don't know what happened to that there, but in my profile directory,
> mimeTypes.rdf contained this gem:
>
> <RDF:Description RDF:about=
> NC:value=
> NC:editable="true"
> NC:fileExtensio
> NC:description=
>
> I've edited this to instead say:
>
> <RDF:Description RDF:about=
> NC:value=
> NC:editable="true"
> NC:fileExtensio
> NC:description=
>
> Now file upload works.
>
>
... weird... I happen to have multiple entries for files with a pdf
extension. One of them says "application/
"application/
So our problem might be the consequence of the usage of older firefox
version that for some reasons wrote wrong things (or things in the wrong
order) in the file.
I believe that we need to find out if a clean profile autogenerated by
the latest firefox shipped with Ubuntu creates the correct entry for pdf
files.
If it does, then we do not have a bug with ubuntu's latest firefox. We
have just something to put in the wishlist: namely a way to manage the
mimetype file when something goes wrong.
Conversely, if a clean profile autogenerated by the latest firefox
shipped with Ubuntu creates an uncorrect entry for pdf files (binary,
octetstream), then we have a bug.
John Vivirito (gnomefreak) wrote : | #10 |
sergio.callegari wrote:
> WalterNicholls wrote:
>
>> I have a possible solution - look at mimeTypes.rdf (see below)
>>
>> I can confirm this problem, and while trying to find a fix, I came
>> across this bug. There are also numerous logged on bugzilla.
>>
>> For the record: On Kubuntu Hardy, running under KDE3, Firefox version
>> Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008071717
>> Firefox/3.0.1. Plenty of extensions none of which I think are relevant.
>>
>> Uploading PDF attachments to PHPList (phplist.com), they come through as
>> application/binary. Konqueror does it fine. This is a serious problem,
>> because phplist does not provide a way to change the mime type of an
>> attachment (except a direct database edit, ouch). I can't just use
>> Konqueror because that doesn't support FCKEditor for rich text editing.
>>
>> "file" command reports PDF document, version 1.3, /etc/mime.types and
>> all that look ok.
>>
>> HOWEVER I had ported my firefox profile across from a Windows machine, I
>> don't know what happened to that there, but in my profile directory,
>> mimeTypes.rdf contained this gem:
>>
>> <RDF:Description RDF:about=
>> NC:value=
>> NC:editable="true"
>> NC:fileExtensio
>> NC:description=
>>
>> I've edited this to instead say:
>>
>> <RDF:Description RDF:about=
>> NC:value=
>> NC:editable="true"
>> NC:fileExtensio
>> NC:description=
>>
>> Now file upload works.
>>
>>
>>
> ... weird... I happen to have multiple entries for files with a pdf
> extension. One of them says "application/
> "application/
>
> So our problem might be the consequence of the usage of older firefox
> version that for some reasons wrote wrong things (or things in the wrong
> order) in the file.
>
> I believe that we need to find out if a clean profile autogenerated by
> the latest firefox shipped with Ubuntu creates the correct entry for pdf
> files.
> If it does, then we do not have a bug with ubuntu's latest firefox. We
> have just something to put in the wishlist: namely a way to manage the
> mimetype file when something goes wrong.
>
> Conversely, if a clean profile autogenerated by the latest firefox
> shipped with Ubuntu creates an uncorrect entry for pdf files (binary,
> octetstream), then we have a bug.
>
>
Can you please list the links here for the upstream bugs that you think
fit this bug.
--
Sincerely Yours,
John Vivirito
https:/
https:/
Linux User# 414246
Changed in firefox: | |
assignee: | mozilla-bugs → nobody |
John Vivirito (gnomefreak) wrote : | #11 |
sergio.callegari wrote:
> WalterNicholls wrote:
>
>> I have a possible solution - look at mimeTypes.rdf (see below)
>>
>> I can confirm this problem, and while trying to find a fix, I came
>> across this bug. There are also numerous logged on bugzilla.
>>
>> For the record: On Kubuntu Hardy, running under KDE3, Firefox version
>> Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008071717
>> Firefox/3.0.1. Plenty of extensions none of which I think are relevant.
>>
>> Uploading PDF attachments to PHPList (phplist.com), they come through as
>> application/binary. Konqueror does it fine. This is a serious problem,
>> because phplist does not provide a way to change the mime type of an
>> attachment (except a direct database edit, ouch). I can't just use
>> Konqueror because that doesn't support FCKEditor for rich text editing.
>>
>> "file" command reports PDF document, version 1.3, /etc/mime.types and
>> all that look ok.
>>
>> HOWEVER I had ported my firefox profile across from a Windows machine, I
>> don't know what happened to that there, but in my profile directory,
>> mimeTypes.rdf contained this gem:
>>
>> <RDF:Description RDF:about=
>> NC:value=
>> NC:editable="true"
>> NC:fileExtensio
>> NC:description=
>>
>> I've edited this to instead say:
>>
>> <RDF:Description RDF:about=
>> NC:value=
>> NC:editable="true"
>> NC:fileExtensio
>> NC:description=
>>
>> Now file upload works.
>>
>>
>>
> ... weird... I happen to have multiple entries for files with a pdf
> extension. One of them says "application/
> "application/
>
> So our problem might be the consequence of the usage of older firefox
> version that for some reasons wrote wrong things (or things in the wrong
> order) in the file.
>
> I believe that we need to find out if a clean profile autogenerated by
> the latest firefox shipped with Ubuntu creates the correct entry for pdf
> files.
> If it does, then we do not have a bug with ubuntu's latest firefox. We
> have just something to put in the wishlist: namely a way to manage the
> mimetype file when something goes wrong.
>
> Conversely, if a clean profile autogenerated by the latest firefox
> shipped with Ubuntu creates an uncorrect entry for pdf files (binary,
> octetstream), then we have a bug.
>
>
Is everyone using KDE? Can someone please confirm this happens on gnome
with firefox-
--
Sincerely Yours,
John Vivirito
https:/
https:/
Linux User# 414246
Sarat (dsarat) wrote : | #12 |
On XP and firefox 3.0.1 I receive mimetype for pdf as "text/csv" instead of "application/pdf". Can this be fixed easily?
Sarat (dsarat) wrote : | #14 |
Sorry reported bug at the wrong place. Please Ignore. Wanted to post it to firefox forum
Louis Acresti (louis.acresti) wrote : | #15 |
I don't like raising the dead, but I'm currently experiencing the same issue with Firefox 3.0.3 in Intrepid (8.10).
Namely, whenever I try uploading PDF files, they are detected as "application/
I'm running a somewhat custom installation though, could someone else confirm this behavior?
Here is some version from Firefox:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008101315 Ubuntu/8.10 (intrepid) Firefox/3.0.3
Louis Acresti (louis.acresti) wrote : | #16 |
Bug is also present with:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111318 Ubuntu/8.10 (intrepid) Firefox/3.0.4
John Vivirito (gnomefreak) wrote : | #17 |
Renamed package to firefox-3.0 due to 2.0 being obsolete.
Can you please let us know if this is still a problem with latest version of firefox in your repos? should be version 3.0.7
Nikolaus Rath (nikratio) wrote : | #18 |
Yes, it is still an issue with 3.0.11 from Jaunty. For me, PDFs are uploaded with mime type application/
Changed in firefox-3.0 (Ubuntu): | |
status: | Incomplete → Confirmed |
Michael JasonSmith (mpj17) wrote : | #19 |
[Ubuntu 9.10, Firefox 3.5.8]
When I posted PDF files using Firefox the MIME-type was being set to text/html. However, I noticed in ~/.mozilla/
<RDF:Description RDF:about=
<NC:
<NC:
<NC:
<NC:
<NC:handlerProp RDF:resource=
</RDF:
After removing the line "<NC:fileExtens
In Mozilla Bugzilla #556977, Timmhaas (timmhaas) wrote : | #20 |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
upload of pdf files fail cause of wrong mime-type. mime-type is send as "application/
Reproducible: Always
Steps to Reproduce:
1. Just use an simple php upload form and upload a pdf file. use PHP to get $_FILES[
Actual Results:
application/
Expected Results:
application/pdf
In Mozilla Bugzilla #556977, Remkodekeijzer (remkodekeijzer) wrote : | #21 |
Just created a test php script:
<html>
<head>
<meta http-equiv=
<title>Naamloos document</title>
</head>
<body>
<?php if(!isset(
{ ?>
<form action="<?php echo $_SERVER[
<p>
<input type="file" name="bestand" id="bestand">
</p>
<p>
This was the result of uploading a pdf file:
application/pdf
In Mozilla Bugzilla #556977, Timmhaas (timmhaas) wrote : | #22 |
Just tried your script to verify that the problem still occurs. Same problem, sorry. I also checked IE, IE works fine for me. So needs to be a Firefox issue.
I am for sure it is caused by the new update. Are you on a Windows 7 64-Bit system by the way? Yesterday I worked the whole day at a order processing script (tried it a hundred times) before Firefox automatically updated. After the update, the problem occured.
P.S: I also tried different PDF files.
In Mozilla Bugzilla #556977, Remkodekeijzer (remkodekeijzer) wrote : | #23 |
I'm running Firefox 3.6.3 on Windows Vista 32-bit
Mozilla/5.0 (Windows; U; Windows NT 6.0; nl; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 - Build ID: 20100401080539
arno_b (arno.b) wrote : | #24 |
On Lucid, firefox 3.6.3
I also suffer of the same issue with the following website with different pdf documents:
https:/
Here is the message given by the website:
We require that the submission be submitted in PDF format, so the 'MIME Type' of your submission must be " application/pdf application/x-pdf application/adobe application/
I have no problem when using epiphany.
In Mozilla Bugzilla #556977, Florian-marchon (florian-marchon) wrote : | #25 |
I have the same problem here. I'm using Firefox 3.6.3 on a Windows 7/32-bit system. My PDF-files are uploaded as text/html, while being uploaded as application/pdf on Internet Explorer 8. The PDF files are created using Adobe InDesign CS3 and edited using Adobe Acrobat 8 Professional.
Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
In Mozilla Bugzilla #556977, Zug-treno (zug-treno) wrote : | #26 |
Duplicate of/related to bug 512982 comment 8 or bug 491982 -> Core bug 373621?
In Mozilla Bugzilla #556977, John Vivirito (gnomefreak) wrote : | #27 |
This bug has also been reported in the Ubuntu bug tracker. So it happens on Linux as well as Windows.
Here is the Ubuntu bug report
https:/
Roberto (roberto-colnaghi) wrote : | #28 |
I'm quite sure this is not an Ubuntu bug, but a Firefox one. I have the same problem on a Mac, and a Windows machine. The workaround (not the solution, which should come from Mozilla) is the one pointed out in comments #8 and #19.
Changed in firefox-3.0 (Ubuntu): | |
status: | Confirmed → Invalid |
arno_b (arno.b) wrote : | #29 |
If the problem comes from firefox, find the corresponding bug report in the mozilla database and link this report to it, but do not close this report while the problem is not clearly identified.
Changed in firefox-3.0 (Ubuntu): | |
status: | Invalid → New |
John Vivirito (gnomefreak) wrote : | #30 |
Changed source package to reflect new no versioning of Packages.
Marked as confirmed since a few people are seeing this bug.
If you can not find a bug in Mozilla database please file one with Mozilla and drop the link to the Mozilla bug here so we can track it.
affects: | firefox-3.0 (Ubuntu) → firefox (Ubuntu) |
Changed in firefox (Ubuntu): | |
status: | New → Confirmed |
Roberto (roberto-colnaghi) wrote : | #31 |
Well, I'm sure this is not an Ubuntu bug, as I explained, so this is definitely clearly identified, but I have no time nor interest to search in the Mozilla database for a bug I already solved (sort of). I thought to be helpful, but if you don't understand it, then keep searching the solution where you can't find it, it's your problem.
arno_b (arno.b) wrote : | #32 |
>Well, I'm sure this is not an Ubuntu bug
Maybe, as a lot of firefox bugs. If you close these reports people will open others again and again until these bugs are fixed by mozilla.
>I have no time nor interest to search in the Mozilla database
Ok, no problem someone will do it.
>I thought to be helpful
Of course you are since you triage ubuntu bugs ;)
John Vivirito (gnomefreak) wrote : | #33 |
Roberto,
Can you please at least post what you did to "solved (sort of)"
Arno_b,
I'm guessing you found the bug upstream.
Thanks
Roberto (roberto-colnaghi) wrote : | #34 |
John, I was simply referring to the workaround pointed out by our fellow testers in comments #8 and #19, which for me is better than nothing while waiting for Mozilla to fix (although I think this will not so simple, as it is a result of learning from sites which send wrong mime types, it's the old problem "extensions are not file types, but everybody (OSs, web browsers, web servers, ecc...) still insist using them as such" )
Arno_b, it was me who didn't understand your comment (and the way this database/community works), please accept my apologies.
Changed in firefox: | |
status: | Unknown → New |
John Vivirito (gnomefreak) wrote : | #35 |
Thanks i totally missed those for some reason
In Mozilla Bugzilla #556977, Roland-bannier (roland-bannier) wrote : | #36 |
Same as 547234 and as well on Mac OS X.
Changed in firefox: | |
importance: | Unknown → High |
Luis Galárraga (shamantobi) wrote : | #37 |
Just as additional information, the bug is not present in Firefox 3.6.13 for Ubuntu (at least in 10.04) however it is still in the latest version of Firefox for Windows. I have 2 instances of Firefox, one running natively in Linux and the other with Wine and the second one reports "application/
In Mozilla Bugzilla #556977, Bugzilla-tf (bugzilla-tf) wrote : | #38 |
*** This bug has been marked as a duplicate of bug 373621 ***
Changed in firefox: | |
status: | New → Invalid |
Thomas Hotz (thotz-deactivatedaccount) wrote : | #39 |
Can you please test this with a supported Firefox version? Does this error still occour? Thank you for your help!
Sergio Callegari (callegar) wrote : | #40 |
Hi,
I am not anymore able to reproduce the issue. Yet, I cannot exactly say if this is because of firefox having been fixed or environmental conditions being changed...
1) Our dept repository has been completely renewed. The new one does not have the issue, but possibly it is now checking some magic in the files it receives to explicitly verify the file types.
2) E-papers does not have the issue anymore. But again I know it has been enhanced to workaround lots of browsers issues.
At this point, I think that it is anyway relatively safe to close the bug. If I see the issue again in a reproducible context, I'll open a new one.
Thomas Hotz (thotz-deactivatedaccount) wrote : | #41 |
Thank you for your response! Please feel free to report any bug you encounter in Ubuntu!
Changed in firefox (Ubuntu): | |
status: | Confirmed → Invalid |
Sergio Callegari (callegar) wrote : | #42 |
I'm reopening the bug for firefox 16.0.1.
I find it whenever trying to upload files to anagrafericerca
However, when trying to upload a pdf file with firefox, the site responds
IL TIPO DEL FILE NON PUO' ESSERE ACCETTATO (application/
I TIPI ACCETTABILI SONO:
image/gif
image/png
image/x-png
image/jpeg
image/pjpeg
image/pjpeg
application/pdf
text/html
text/plain
which, as you probably imagine, means that the site is refusing the upload, because I'm trying to upload a file with mimetype application/
Changed in firefox (Ubuntu): | |
status: | Invalid → New |
Thomas Hotz (thotz-deactivatedaccount) wrote : | #43 |
Then I will confirm this bug.
Changed in firefox (Ubuntu): | |
status: | New → Confirmed |
Sergio Callegari (callegar) wrote : | #44 |
Obviously, I double checked with other browsers that it is not the destination site to get confused.
Google chrome uploads files to anagrafericerca
everflux (tklaunchpad) wrote : | #45 |
This bug still affects firefox 40, I checked with the network tab, firefox is sending
Content-
Content-Type: application/empty
darko (darko) wrote : Re: [Bug 84880] Re: firefox uploads files with wrong mimetype | #46 |
Ja same ženske želje, malo premisli...Ha ha
On 14. 08. 2015 21:14, everflux wrote:
> This bug still affects firefox 40, I checked with the network tab,
> firefox is sending
>
> Content-
> Content-Type: application/empty
>
IP Man (ipman98) wrote : | #47 |
This bug is still affects firefox 39 and 40. So, I created a simple upload page (http://
But I get 'Invalid file format' error for every file I upload, even for supported formats. Also, I tried to upload using ubuntu default web browser, still get the same problem. Maybe this issue is in the ubuntu, not in firefox.
everflux (tklaunchpad) wrote : | #48 |
I found a fix for the issue.
While I am not sure what is causing it (firefox or ubuntu) the problem is in the "mimeTypes.rdf". delete the file while firefox is not running and the problem is gone.
Whenever firefox downloads a file with a wrong mimetype it will record the broken mimetime along the file extension in that file and use that again when uploading files.
This is contagious, once a download is done with a bad type it is persisted and will be used for an upload, if the remote site keeps the mimetype from the upload and uses that when sending the file to the next user with firefox it will record it in that users mimetypes....
Paul White (paulw2u) wrote : | #49 |
Upstream bug is a duplicate of #373621
Showing "RESOLVED FIXED" on 2016-07-29
Target release - Firefox 50
Closing this one by marking "Fix Released"
Changed in firefox (Ubuntu): | |
status: | Confirmed → Fix Released |
Can you please provide us with a link to the PDF you are trying to save?