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:

</extensions>Code language: HTML, XML (xml)

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.


  1. Henry Roger says:

    Hi Jackey,

    I was looking for a solution to upload PDF/zip files in WYSIWYG editor but the link you have posted can’t be found. Can you help me with it? Currently I am using the following extension to upload PDF and other file types in Magento 2.

  2. Jackey says:

    I found this solution that works without having to modify the core file:

  3. Ton says:

    Magento ver. 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?

  4. waddelljb says:

    Worked OK with Magento 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.

    1. Rick says:

      Thanks for the feedback, glad it worked!

  5. Ronald says:

    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.

  6. iel says:

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

    1. Rick says:

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

  7. JMLeon says:

    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?

    1. quicoto says:

      You can add the PDF to anywhere you can write.

      The description or short description.

      Just open the HTML editor, create a LINK and upload the file 😛

      Rember this is just a normal attachment. You can create Downloadable Products:

Leave a Reply

Your email address will not be published. Required fields are marked *