Excel file upload problems

General questions relating to Joomla! 3.x. Please consider the availability of third-party templates and extensions when deciding which Joomla version to use.

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.
Post Reply
User avatar
ianincalvados
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Nov 11, 2010 2:29 pm

Excel file upload problems

Post by ianincalvados » Sat Jan 12, 2019 3:11 pm

I am having problems uploading both xls and xlsx files to a folder in Media (I want to make them available for client download). I have added both xls, xlsx,XLS and XLSX to Legal Extensions (File Types) in Media>Options, both xls and xlsx to Legal Image Extensions (File Types) as well as entering MIME values in Legal MIME Types

Legal Extensions(File Types)
xls,xlsx,bmp,csv,doc,gif,ico,jpg,jpeg,odg,odp,ods,odt,pdf,png,ppt,txt,xcf,xls,BMP,CSV,DOC,GIF,ICO,JPG,JPEG,ODG,ODP,ODS,ODT,PDF,PNG,PPT,TXT,XCF,XLS,XLSX

Legal MIME Types
application/vnd.ms-excel,application/octet-stream,image/jpeg,image/gif,image/png,image/bmp,application/msword,application/excel,application/pdf,application/powerpoint,text/plain,application/x-zip,application/xlsx,application/xls,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Initially the error message was 'Invalid MIME type'. Now the message has changed to 'Not a Valid Image'. Added xls and xlsx to Legal Image Extensions but still get the same error message.

I have succeeded in uploading the file by setting Restrict Uploads to off - but this doesn't seem a viable long term solution. Any solutions?

User avatar
AMurray
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4167
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Excel file upload problems

Post by AMurray » Sat Jan 12, 2019 9:54 pm

You seem to already have them listed, but on Google I haven't found anything more than what you already have. But maybe the way you have written them is incorrect, the ones below seem slightly different to what you have.
Google wrote:What is the MIME type for Xlsx?
Office 2007 File Format MIME Types for HTTP Content Streaming
Ext MIME Type
.xls application/vnd.ms-excel
.xlt application/vnd.ms-excel
.xla application/vnd.ms-excel
.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Regards,
--------------------------------------------------------------
A Murray
Millennium Falcon - it's the ship that made the Kessel run in less than 12 parsecs! The fastest hunk of junk in the galaxy.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 25107
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Excel file upload problems

Post by Per Yngve Berg » Sun Jan 13, 2019 12:35 am

Excel files are not media.

Use Phoca Download for downloadable files.

https://extensions.joomla.org/extension/phoca-download/

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19302
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: Excel file upload problems

Post by leolam » Sun Jan 13, 2019 8:42 am

Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
Member Joomla Bug Squad & Joomla CMS Release Team

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 10324
Joined: Thu Feb 15, 2007 5:48 am
Location: Oxford, UK
Contact:

Re: Excel file upload problems

Post by toivo » Sun Jan 13, 2019 10:38 am

wrote:Now the message has changed to 'Not a Valid Image'. Added xls and xlsx to Legal Image Extensions but still get the same error message.
If that message is exactly as it was displayed, it does not seem to originate from the Joomla core. Are you trying to upload the spreadsheet from Content - Media or by using some other method? Are you perhaps using some third party extension, maybe also a security extension?

The file extensions xls and xlsx and their CAPS versions need to be in the first field, 'Legal Extensions (File Types)'. They are not needed in 'Legal Image Extensions (File Types)'.

If the spreadsheet was produced in a recent version of Excel, make sure that the field 'Legal MIME Types' includes at least 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'. Otherwise, add all the MIME types from @AMurray's list.

Please note that uploading spreadsheets from Content - Media works all right in Joomla 3.9.1, as long as the entries of legal file types and MIME types allow it.
Toivo Talikka, Global Moderator
my first programs were assembled and run in 16KB :)
troubleshooting smtp and other articles https://talikka.com/joomla


Post Reply

Return to “General Questions/New to Joomla! 3.x”