Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7636217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:37:08+00:00 2026-05-31T07:37:08+00:00

Well, i believe this is not a Codeigniter problem per se as it is

  • 0

Well, i believe this is not a Codeigniter problem per se as it is more of a mime-type.

I’m trying to upload a file, a xls (or xlsx) file and the mime-type the browser and the php report is application/octet-stream instead of application/excel, application/vnd.ms-excel or application/msexcel for a xls file. Of course codeigniter upload plugin will report an error (invalid file type) as it tries to match the file extension with the mime-type.

The weird(est) thing might be that the same code worked for months and now stopped working with the latest Chrome (16.0.912.77), Firefox (10.0) and IE9.

Has anyone had the same (or similar) problem and care to share the solution?

Thank you very much.
PS: I won’t provide code as it’s not really a code matter, but if necessary i’ll upload some snippets.

EDIT

It might be relevant: the error doesn’t happen with same browsers on a similar configuration, but with MS Office instead of Libre Office (on my pc). It doesn’t happen on a GNU/Linux based + Libre Office system either. SO, could it be Windows playin’ hard on the open source suite, or the Libre Office changing the mime-types just for the heck of it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:37:09+00:00Added an answer on May 31, 2026 at 7:37 am

    I’m getting this error also.

    CI is reporting a file type of ‘application/zip’ which makes sense as the xlsx format is a compressed format (rename it to zip and you can open the contents).

    I have added/replaced the following line to the mime types file (application/config/mimes.php):

    'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','application/zip'),
    

    and that works (for this browser at least!)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I believe this question applies equally well to C# as to Java, because both
Please check out this http://jsfiddle.net/karthik64/JHVDn/1/ . Well I believe you got where I am
I believe this is not the popular stance but I prefer embedded hacks such
I believe this is a permissions issue, but not sure how to fix it.
I believe I have disabled the view state on all controls as well as
I am beginning to believe that unit testing high level, well-written code, which requires
Well, this is my first post here and really enjoying the site. I have
I am trying to use SimpleTest with CodeIgniter, using code supplied by maroonbytes .
I can't believe this - I just starting developing an SSRS report, using a
Consider the following statements We are not talking about a well established company in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.