• Hi,

    I have been googling all afternoon about adding MIME Types to function.php etc. And still can’t get help.

    My grand plan is to run WordPress as my company Intranet as Sharepoint is too expensive and WSS (Free sharepoint) is a total pain in the a$$!

    Problem is we upload docx, xlsx and .tr5 media.

    A tr5 link is effectively a .lnk file for our Document Management system being HP Trim.

    Is there anyway to just allow any extension to be uploaded to WordPress? Also I am not a wordpress rocket scientist so require things to be spelt out to me if I need to start messing with php.

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You may be able to find a plugin to add mime types by searching the WP Plugin Directory for ‘mime types‘. For example, the Manage Upload Types plugin.

    Thread Starter wt9bind

    (@wt9bind)

    Thank you, that allowed me to upload it.

    I added it as: tr5 text/trim

    However, once uploaded it would open as text rather than ask to open the file.

    So after some googling.

    Modifying the .htaccess as follows:

    AddType application/octet-stream tr5
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Worked a treat.

    Also as I am running LAMP, running this command:

    sudo /etc/init.d/apache2 restart

    Then clear the cache of the browser.

    All fixed.

    Happy Camper 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Allow any extension to be uploaded’ is closed to new replies.