I am having a problem specifically with uploading PDF files when using Firefox (27.0.1).

Currently, I have the following in my mimes.php file:

'pdf'    =>    array('application/pdf', 'application/x-download', 'application/octet-stream', 'application/binary', 'application/unknown'),  

I have tried many variations of the above, and nothing has worked so far.

Has anyone found the proper type to add for PDFs that works with Firefox?

  • did this happen when u login as superadmin??
    – Ahmad Saad
    Mar 14 '14 at 22:30
  • yes... but not if I upload the pdf straight from the admin panel. This is an issue with Firefox specifically where it does not send pdfs with the proper mimetype when you submit them through forms on websites.
    – enga
    Mar 14 '14 at 22:40
  • If anyone knows how I can get FreeForm to show me what mimetype it is getting and return that as part of it's returned upload errors, that would be amazing! I can't even find a way to get my template to show me what mimetype was received from FF.
    – enga
    Mar 14 '14 at 22:52
  • 1
    Assuming you're running the latest version (4.1.3), add the following code to line 232 of /system/expressionengine/third_party/freeform/act.freeform.php (move the foreach to line 233): die('<pre>'.print_r($_FILES,TRUE).'</pre>');. That should give you the mime-type as the server sees it. Mar 17 '14 at 18:52
  • @enga hi I reread your all comments here, so try this first login as subperadmin , create an EE native form(channel:form) and try to upload the same pdf file you success to upload form CMS and let me know if this work.
    – Ahmad Saad
    Mar 18 '14 at 10:53

I've seen instances where PDF uploads won't work in Firefox if you've got ExpressionEngine XSS filtering file uploads. In Admin -> Security and Session Preferences, set "Apply XSS Filtering to uploaded files?" to "No".

I'm not a fan of disabling security measures like this, but I've found no other solution.

  • I frequently need to turn off XSS filtering for uploads as well. Mar 17 '14 at 0:56
  • Unfortunately this is already something I had done.
    – enga
    Mar 17 '14 at 14:28

try to use this one

'pdf'    =>    array('application/pdf', 'application/x-download', 'application/download') 

and tell me

and you can always solve this problem by rename the mimeTypes.rdf file which you can find in



  • I am going to try this one and see. As far as renaming the mimeTypes.rdf file, that would be good for me, but still wouldn't solve anything for users of our site that happen to use Firefox. Thank you, I will get back with whether those mimetypes work for me or not!
    – enga
    Mar 17 '14 at 14:29
  • I'm afraid this didn't work either. :(
    – enga
    Mar 17 '14 at 14:36

-edited out-

Going by http://ellislab.com/forums/viewthread/92552/ -> https://bugzilla.mozilla.org/show_bug.cgi?id=332690#c24


Check out your mimeTypes.rdf and let us know if there's anything funky there, all the variants there are in your mimes.php, etc.

edit 2::

woops, sorry didn't realize there was more to the original array, thought it was just 3 types in there.

  • Thanks notacouch. I've had a look at the .rdf and I am not seeing anything weird. <RDF:Description RDF:about="urn:mimetype:application/pdf" NC:value="application/pdf"> <NC:handlerProp RDF:resource="urn:mimetype:handler:application/pdf"/></RDF:Description>
    – enga
    Mar 19 '14 at 14:46

Check this bolg, it seems that there are some solutions


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.