Project

General

Profile

Actions

Feature #451

closed
DC DC

How to Allow More File Types in Magento

Feature #451: How to Allow More File Types in Magento

Added by Daniel Curtis over 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
09/05/2014
Due date:
% Done:

100%

Estimated time:
0:06 h
Spent time:

Description

I wanted to add a m4v file to the product description but Magento has a limited amount of permitted upload file types. Unfortunately there is currently not an option to add, remove, or modify these file types in the Admin Panel; but there is a way of accomplishing this by modifying a little source code.

  • Look for the file: /app/code/Core/Mage/Cms/etc/config.xml
  • You should create the same folder structure to inside /app/local: Copy config.xml into /app/local/Core/Mage/Cms/etc/

That’s the way to make the change upgrade proof.

Add the extensions

  • Open the config.xml I mentioned above and around the line 100 you will find something like this:
    <extensions>
        <allowed>
            <jpg>1</jpg>
            <jpeg>1</jpeg>
            <png>1</png>
            <gif>1</gif>
            <pdf>1</pdf>
        </allowed>
        <image_allowed>
            <jpg>1</jpg>
            <jpeg>1</jpeg>
            <png>1</png>
            <gif>1</gif>
        </image_allowed>
        <media_allowed>
            <flv>1</flv>
            <swf>1</swf>
            <avi>1</avi>
            <mov>1</mov>
            <rm>1</rm>
            <wmv>1</wmv>
        </media_allowed>
    </extensions>
    

Notice the added <m4v>1</m4v> to the allowed extensions.

After uploading the file refresh the Magento Cache and also try to log out from the Magento Admin Panel.

DC Updated by Daniel Curtis over 11 years ago Actions #1

  • Tracker changed from Bug to Feature
  • Status changed from New to Closed
  • % Done changed from 50 to 100

DC Updated by Daniel Curtis over 10 years ago Actions #2

  • Project changed from 6 to Website Hosting
  • Description updated (diff)
Actions

Also available in: PDF Atom