How to Allow more file types Magento

Allow more file types to Magento.

I wanted to add a PDF file to the product description but Magento just allow image file types.

Let’s get started.

Core Files

Look for the file: /app/code/Core/Mage/Cms/etc/config.xml

You should create the same folder structure inside /app/local/…

That’s the way to make the change upgrade proof. But I did and didn’t work 🙁

Add the extensions

Open the config.xml I mentioned above and around the line 100 you will find something like this:

Please notice I added <pdf>1</pdf> to the allowed extensions.

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

Tags:

9 Responses to “How to Allow more file types Magento”

  1. JMLeon December 31, 2010 at 2:54 pm #

    So when you add a PDF to any product, you have it with the pictures in the product view or you can put it in the template wherever you want?

  2. iel January 11, 2013 at 2:24 pm #

    i just tested this on Magento ver. 1.7.0.2 and it doesn’t seem to work?

    • Rick January 14, 2013 at 7:58 pm #

      I haven’t had the chance to try it in that version 🙁

  3. Ronald February 11, 2013 at 9:07 pm #

    What about more file types on downloadable products? Some extensions not allowed.. like php/html/js etc. I don’t see those controlled via XML.

  4. waddelljb February 19, 2013 at 10:36 pm #

    Worked OK with Magento 1.7.0.2 when using in WYSIWG editor to link images and text to PDF files using standard html and the link feature in editor. PDF files will now up load into storage.
    Thanks a lot for a simple but clever tip.
    Remember to log out and login.

    • Rick February 19, 2013 at 10:40 pm #

      Thanks for the feedback, glad it worked!

  5. Ton June 9, 2014 at 5:20 am #

    Magento ver. 1.8.1.0 copy to local/Mage/Cms/etc/config.xml , doesn’t work even clear cache and logout.
    But change in core/Mage/Cms/etc/config.xml working. Is it good to change in core?

  6. Jackey February 22, 2015 at 5:17 pm #

    I found this solution that works without having to modify the core file:
    http://prattski.com/2011/01/10/magento-allow-other-file-types-in-wysiwyg-editor/

Leave a Reply

Add <code> Some Code </code> by using this tags.