Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
-
- Joomla! Fledgling
- Posts: 2
- Joined: Fri Apr 01, 2016 7:10 pm
Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
After upgrading to Joomla 3.7.1, I was unable to upload pdf files to my images folder. I got this message: "Illegal or invalid mime type detected". I was able to reinstall my application from a 3.7.0 backup, and I am now able to upload pdf files with this older version of Joomla. Has anyone else had this issue?
- abernyte
- Joomla! Virtuoso
- Posts: 4189
- Joined: Fri May 15, 2009 2:01 pm
- Location: Écosse - Scozia - Escocia - Škotija -स्कॉटलैंड
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
It appears to be a known issue, to be fixed in 3.7.2 https://github.com/joomla/joomla-cms/pull/16091
"Those who expect to reap the blessings of freedom must, like men, undergo the fatigue of supporting it." Thomas Paine
-
- Joomla! Fledgling
- Posts: 2
- Joined: Fri Apr 01, 2016 7:10 pm
-
- Joomla! Fledgling
- Posts: 2
- Joined: Tue Jan 29, 2008 1:55 am
- Location: Waikoloa, HI
- Contact:
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
I had the same issue. I was glad to find your post about it and the reference to it being an issue in 3.7.1 so I contacted my web host who said they were waiting for a stable version of 3.7.1. Frustrating.
However, the web host tech said to try uploading via ftp. Brilliant! No problems whatsoever.
So, while it was a minor inconvenience not to be able to upload in the Admin area, it took mere seconds to do so via ftp. I'm guessing it took you longer to reinstall 3.7.0.
However, the web host tech said to try uploading via ftp. Brilliant! No problems whatsoever.
So, while it was a minor inconvenience not to be able to upload in the Admin area, it took mere seconds to do so via ftp. I'm guessing it took you longer to reinstall 3.7.0.
- Ginza
- Joomla! Enthusiast
- Posts: 135
- Joined: Fri Oct 27, 2006 1:16 am
- Contact:
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
I got the same issue in Joomla 3.7.2
Coming Soon!
-
- Joomla! Fledgling
- Posts: 4
- Joined: Fri May 26, 2017 11:08 am
SOLVED IT Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
For some reason in joomla 3.7.0 , 3.7.1 and 3.7.2 when you go to Global Configuration > Media > Legal MIME TYPES you may see that when it comes to pdf files it says "aaplication/pdf" (this is what i found anyway) . Remove one "a" and you are fine.
- Ginza
- Joomla! Enthusiast
- Posts: 135
- Joined: Fri Oct 27, 2006 1:16 am
- Contact:
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
I had the issue for Jpg image.
Coming Soon!
-
- Joomla! Fledgling
- Posts: 4
- Joined: Fri May 26, 2017 11:08 am
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
Check if jpeg is not included in the Valid MIME TypesGinza wrote:I had the issue for Jpg image.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Fri May 26, 2017 11:08 am
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
Ginza wrote:I had the issue for Jpg image.
You do not have the required permissions to view the files attached to this post.
- Ginza
- Joomla! Enthusiast
- Posts: 135
- Joined: Fri Oct 27, 2006 1:16 am
- Contact:
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
I have both jpeg and jpg included in the Media settings
You do not have the required permissions to view the files attached to this post.
Coming Soon!
-
- Joomla! Fledgling
- Posts: 1
- Joined: Mon May 29, 2017 10:09 am
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
hi has there been a fix released for this issue? I have over 30 websites that are using joomla 3.7.2 and it would be great if there was something I could upload to fix this or if the fix will come out in joomla 3.7.3?
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
Are you trying to upload a .jpg, .jpeg, .Jpg, .JPG (or various other combinations of upper/lowercase file extensions)? As far as I'm aware (and I've tested this feature on a dozen or more J! 3.7.2 websites) there isn't a problem here.
This topic started with "PDF" in the subject title. Why are we now discussing JPG images?
This topic started with "PDF" in the subject title. Why are we now discussing JPG images?
- toivo
- Joomla! Master
- Posts: 17370
- Joined: Thu Feb 15, 2007 5:48 am
- Location: Sydney, Australia
Re: SOLVED IT Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
That is a local issue only. The option 'Legal MIME Types' has the following types in Joomla 3.7.0:Mam Labs wrote:For some reason in joomla 3.7.0 , 3.7.1 and 3.7.2 when you go to Global Configuration > Media > Legal MIME TYPES you may see that when it comes to pdf files it says "aaplication/pdf" (this is what i found anyway) . Remove one "a" and you are fine.
Code: Select all
image/jpeg,image/gif,image/png,image/bmp,application/x-shockwave-flash,application/msword,application/excel,application/pdf,application/powerpoint,text/plain,application/x-zip
Toivo Talikka, Global Moderator
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue May 30, 2017 6:43 am
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
thanks for the information abernyte
-
- Joomla! Apprentice
- Posts: 18
- Joined: Tue Nov 14, 2006 1:32 am
- Location: USA
- Contact:
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
Running 3.7.2 and still receiving the mime type error when trying to upload a pdf via media manager. This is occurring on multiple sites on different hosts. Is there a fix?
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
It depends on what's "broken".loophole wrote:Running 3.7.2 and still receiving the mime type error when trying to upload a pdf via media manager. Is there a fix?
I've tested PDF uploads (via the Media Manager) on several sites and I don't have a problem. What more can I tell you? I'm using J! 3.7.2, Isis, no changes (to what "normally" comes with Joomla) as far as the list of valid mime types is concerned, a trustworthy/reliable webhosting environment, etc. I just don't have this problem and, to put this into some context, with more than 7.2% of all Joomla sites (since the collection of usage statistics began with J! 3.5.0) now using J! 3.7.2, if the problem was widespread then we'd see a more active and concerted involvement in this topic. We simply don't have that level of engagement.
We may not be able to help you navigate a solution for this problem with the website you're currently using or because of the webhosting environment that you've chosen. In situations like these, however, my advice is to build a completely now J! 3.7.2 test site—not one of those "quick install" things, of course!—on your webhosting platform; install nothing extra and run the test upload there (i.e. attempt to upload a PDF file to the test site). If the upload attempt fails with the same error message then it's probably the webhosting platform you're using and it's not Joomla per se.
-
- Joomla! Apprentice
- Posts: 18
- Joined: Tue Nov 14, 2006 1:32 am
- Location: USA
- Contact:
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
We are using a dedicated server on siteground for one site and the others are on a container at PowerVPS. It occurs with both PHP 5.6 and 7. I'll try a fresh build in both environments to test and follow up here.
For reference, there is also a thread on the issue on github: https://github.com/joomla/joomla-cms/issues/16238
For reference, there is also a thread on the issue on github: https://github.com/joomla/joomla-cms/issues/16238
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
The conclusion of that discussion is "most of us can't [reproduce the problem] as it looks like a server/hosting issue." I'm not saying any differently.loophole wrote:For reference, there is also a thread on the issue on github: https://github.com/joomla/joomla-cms/issues/16238
- hafism
- Joomla! Intern
- Posts: 97
- Joined: Thu May 30, 2013 7:51 am
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
Hi guys. I'm having this issue too and managed to fixed it. I'm using Joomla 3.7.2, PHP 5.6 and running on Windows IIS.
Hope this solution will help you.
1) Check in PHP extension folder if php_fileinfo.dll is available or not.
2) If it is available, enable it in php.ini by adding extension=php_fileinfo.dll
3) Save it, restart IIS and try upload the PDF again.
4) If you are running on Linux/Apache, add extension = fileinfo.so if I'm not mistaken.
Cheers!
Hope this solution will help you.
1) Check in PHP extension folder if php_fileinfo.dll is available or not.
2) If it is available, enable it in php.ini by adding extension=php_fileinfo.dll
3) Save it, restart IIS and try upload the PDF again.
4) If you are running on Linux/Apache, add extension = fileinfo.so if I'm not mistaken.
Cheers!
Regards,
Hafiz
http://www.hafism.com | http://www.ibrah.hafism.com
Find me on Facebook and Twitter @feeziologi
Hafiz
http://www.hafism.com | http://www.ibrah.hafism.com
Find me on Facebook and Twitter @feeziologi
-
- Joomla! Apprentice
- Posts: 16
- Joined: Fri Jun 19, 2015 8:24 am
- Location: Boksburg, South Africa
- Contact:
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
What I did was:
log into cPanel
Choose "select PHP version" under "software" heading
Make sure fileinfo is checked
log into cPanel
Choose "select PHP version" under "software" heading
Make sure fileinfo is checked
- mattsson
- Joomla! Apprentice
- Posts: 27
- Joined: Thu May 03, 2007 5:54 pm
- Location: Cupertino, CA, USA
Re: SOLVED: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
I tried the advice of upgrading to Joomla 3.7.2 and this solved the problem for me. Thank you abernyte.
- sip
- Joomla! Apprentice
- Posts: 48
- Joined: Mon Jul 09, 2007 5:34 pm
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
Thanks OldGoat...that solved it for me.OldGoat wrote:What I did was:
log into cPanel
Choose "select PHP version" under "software" heading
Make sure fileinfo is checked
I've been moving sites over from PHP 5.6 to 7.1 and that setting isn't on by default.
-
- Joomla! Apprentice
- Posts: 18
- Joined: Sun Jan 18, 2009 8:18 pm
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
Joomla 3.7.0 with PHP fileinfo NOT enabled - upload of .PDF worked
Joomla 3.7.1 with no change to PHP fileinfo - upload of .PDF QUIT WORKING
Joomla 3.7.2 with no change tto PHP fileinfo - STILL CANNOT UPLOAD .PDF
THEN had web host techs ADD fileinfo to PHP - NOW we can upload .PDF files again.
...just another loose end that wasted hours and hours of productivity.
Joomla 3.7.1 with no change to PHP fileinfo - upload of .PDF QUIT WORKING
Joomla 3.7.2 with no change tto PHP fileinfo - STILL CANNOT UPLOAD .PDF
THEN had web host techs ADD fileinfo to PHP - NOW we can upload .PDF files again.
...just another loose end that wasted hours and hours of productivity.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Aug 12, 2015 5:33 pm
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
Thanks OldGoat - worked for me too!OldGoat wrote:What I did was:
log into cPanel
Choose "select PHP version" under "software" heading
Make sure fileinfo is checked
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Jul 07, 2015 5:32 pm
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
Yep thanks, worked for me tooOldGoat wrote:What I did was:
log into cPanel
Choose "select PHP version" under "software" heading
Make sure fileinfo is checked
-
- Joomla! Apprentice
- Posts: 43
- Joined: Thu Feb 13, 2014 1:44 am
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
For what it is worth and whilst it does not necessarily address the problem as outlined, if you are using the paid version of JCE Pro the file/edit button allows you to upload a pdf without any dramas while we wait for the experts to correct this particular anomaly! Cheers.... Rod
-
- Joomla! Apprentice
- Posts: 29
- Joined: Mon Nov 14, 2011 2:54 pm
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
I am having this exact problem and its a serious issue. The client needs to upload multiple pdf forms. It is definitely not the host. We moved it to the development sub folder on our site.
So our root live site was upgraded from Joomla 2.5 to 3.7 + in exactly the same way and the PDF upload works fine. All the settings are the same.
The client site in the subfolder gives invalid mime type. It doesn't even help to upload via FTP (something the client is unlikely to do when they get it back) because the file in the media manager even when FTP says its there and I can re-download it or put the absolute url in web browser and go to it. It does not show in the WYSIWIG editor. It will not upload via Media Manager or the Editor.
This site is using Joomla 3.7.3 so something is wrong. If its not the host, not the settings and the uploads worked fine pre-update then what is left? I need a fix for this.
So our root live site was upgraded from Joomla 2.5 to 3.7 + in exactly the same way and the PDF upload works fine. All the settings are the same.
The client site in the subfolder gives invalid mime type. It doesn't even help to upload via FTP (something the client is unlikely to do when they get it back) because the file in the media manager even when FTP says its there and I can re-download it or put the absolute url in web browser and go to it. It does not show in the WYSIWIG editor. It will not upload via Media Manager or the Editor.
This site is using Joomla 3.7.3 so something is wrong. If its not the host, not the settings and the uploads worked fine pre-update then what is left? I need a fix for this.
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
@Starhorsepax: Did you see this?
sip wrote:Thanks OldGoat...that solved it for me.OldGoat wrote:What I did was:
log into cPanel
Choose "select PHP version" under "software" heading
Make sure fileinfo is checked
I've been moving sites over from PHP 5.6 to 7.1 and that setting isn't on by default.
- mattsson
- Joomla! Apprentice
- Posts: 27
- Joined: Thu May 03, 2007 5:54 pm
- Location: Cupertino, CA, USA
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
OldGoat's fix worked for me too! Thank you OldGoat, i4m_woot and sozzled.
Details: My site is at Joomla 3.7.4 and the PDF upload error was still occurring for me. A clue was, the development site is hosted at SiteGround, I could upload my PDF there. The live site, where I checked the PHP "fileinfo" box to make the fix, is hosted at Rochen.
Details: My site is at Joomla 3.7.4 and the PDF upload error was still occurring for me. A clue was, the development site is hosted at SiteGround, I could upload my PDF there. The live site, where I checked the PHP "fileinfo" box to make the fix, is hosted at Rochen.
-
- Joomla! Apprentice
- Posts: 18
- Joined: Thu Jul 19, 2012 6:13 pm
Re: Illegal or invalid mime type detected when trying to upload pdf after 3.7.1 upgrade
Yes!!! This is the solution. Thanks mate for the knowledge.OldGoat wrote:What I did was:
log into cPanel
Choose "select PHP version" under "software" heading
Make sure fileinfo is checked