WordPress.org

Ready to get started?Download WordPress

Forums

Allow any extension to be uploaded (3 posts)

  1. wt9bind
    Member
    Posted 1 year ago #

    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.

  2. vtxyzzy
    Member
    Posted 1 year ago #

    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.

  3. wt9bind
    Member
    Posted 1 year ago #

    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 :)

Topic Closed

This topic has been closed to new replies.

About this Topic