• Hi,

    I’ve been using WP Add Mime Types for quite some time to add the ability to upload excel files (more particularly .xlsb extension) to my wordpress website as a downloadable product in woocommerce (so it can be distributed online).

    Until today, I had the following settings in the plugin:
    xlsb = application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
    xlsx = application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
    xlsm = application/vnd.ms-excel.sheet.macroEnabled.12

    I now realize that the correct extension for .xlsb should be:
    = application/vnd.ms-excel.sheet.binary.macroEnabled.12

    So my questions are:
    * What is the impact of having the wrong extension associated with a mime type (because it still enabled me to upload xlsb in wordpress)? Could it create incompatibilities and corrupt the file (many users have reported that the xslb file was broken or corrupted when downloaded from the website, which is not the case when I share the file by email directly)? Could that issue be linked to the wrong setting?
    * What will be the impact of updating the correct extension on existing xlsb files uploaded on my website? Trying to avoid breaking anything, or having existing excel files already shared with users disappear.
    * So can I safely update the extension for xlsb without creating any issues with existing xlsb files (= existing woocommerce products)?

    Thanks a lot

Viewing 1 replies (of 1 total)
  • Plugin Author kimipooh

    (@kimipooh)

    The purpose of this plugin is to add extensions that can be uploaded to WordPress, and the reason for setting the MIME-type is because WordPress has a feature that checks the MIME type of files that are uploaded. The default setting of this plugin is to turn off this check feature, so the MIME type can be anything you want. If you enable the checked function, you will not be able to upload your file if you set a false MIME type.

    Also, the handling of the file once uploaded depends on the MIME type setting of the web server.

    Therefore, there is no effect on the uploaded files.

Viewing 1 replies (of 1 total)
  • The topic ‘Impact of wrong file extension for mime type?’ is closed to new replies.