Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid mime type detected: xlsx #20108

Closed
Rollmodl opened this issue Apr 7, 2018 · 9 comments
Closed

Invalid mime type detected: xlsx #20108

Rollmodl opened this issue Apr 7, 2018 · 9 comments

Comments

@Rollmodl
Copy link

Rollmodl commented Apr 7, 2018

Cannot upload Excel spreadsheets

Steps to reproduce the issue

  1. Added xlsx and XLSX to Legal Extensions.
  2. Checked MIME type using http://mime.ritey.com/.
  3. Added application/vnd.openxmlformats-officedocument.spreadsheetml.sheet to Legal MIME Types

Expected result

Actual result

Receiving Error: Invalid mime type detected.

System information (as much as possible)

Additional comments

Also tried disabling "Check MIME Types"

@tonypartridge
Copy link
Contributor

Did you add it to the allowed media manager list? Within the media manager options?

@tonypartridge
Copy link
Contributor

Skip that just reread your post 🙈. Will also run a test!

@Quy
Copy link
Contributor

Quy commented Apr 7, 2018

In \libraries\src\Helper\MediaHelper.php, above line 254 // Get the mime type this is not an image file, add the following:

var_dump($this->getMimeType($file['tmp_name']));
exit;

Please advise the value of the output.

@Rollmodl
Copy link
Author

Rollmodl commented Apr 7, 2018

After upload I'm getting the page/message: bool(false)

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/20108

@Quy
Copy link
Contributor

Quy commented Apr 7, 2018

Please read issue #16238. It has to do with PDF but the information should still be applicable in your case.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20108.

@suniljaswaniit
Copy link

You can add (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) this in Legal MIME types in the list and add xlsx in the Legal Extensions(File Types).
You can find this setting in Joomla administrator > Global > Media Settings.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20108.

@mimfa
Copy link

mimfa commented Apr 15, 2019

add "xlsx" and "XLSX" to your Legal File Types then add "application/vnd.openxmlformats-officedocument.presentationml.presentation" to your Legal MIME Types;

@acvmultimedia
Copy link

Thanks!! For the solution :)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20108.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants