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

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.

10 comments

Leave a Reply

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

*
*