How to allow other file types in the upload field, like .psd or .ai

If you’re using Advanced Product Field’s file upload field, you may have noticed not all file types are allowed to be upload. This is not due to our plugin, but a WordPress security feature. Per default, WordPress only allows certain file types to be uploaded. You can find a list of allowed file types here.

So how do we allow extra file types, like .psd or .ai, that WordPress does not support out-of-the-box? We’ll explain how it can be done in this article.

1. through a plugin

You can use a free plugin like File Upload Types to configure additional file types. This is the easiest method, but requires an additional (albeit very lightweight) plugin.

2. through a code snippet

You can add a code snippet to your site that allows extra file types. You’ll need to know the MIME-type of the file format you want to allow. Find the list of MIME-types paired with file extensions here. Below are a few example snippets

Allow .ai (Adobe Illustrator) files

Supply your license key to unlock the code

Since this is a custom-coded snippet, please enter your license key so we can verify your purchase.

Once the code snippet is added, you have to edit your file upload field and select the restricted file types you just added in the “Accepted File Types” setting:

Add PSD files to the File Upload field settings

Allow .psd (Photoshop) files

Supply your license key to unlock the code

Since this is a custom-coded snippet, please enter your license key so we can verify your purchase.

Once the code snippet is added, you have to edit your file upload field and select the restricted file types you just added in the “Accepted File Types” setting:

Add PSD files to the File Upload field settings

Allow .eps files

Supply your license key to unlock the code

Since this is a custom-coded snippet, please enter your license key so we can verify your purchase.

Once the code snippet is added, you have to edit your file upload field and select the restricted file types you just added in the “Accepted File Types” setting:

Add EPS files to the File Upload field settings

Allow .m4a files

Supply your license key to unlock the code

Since this is a custom-coded snippet, please enter your license key so we can verify your purchase.

Once the code snippet is added, you have to edit your file upload field and select the restricted file types you just added in the “Accepted File Types” setting:

Add M4A files to the File Upload field settings

Allowing ZIP files

Are you trying to upload ZIP files but are met with a This file type is not support error? This help article explains what to do!

Was this article helpful?

Related Articles