Skip to content

Site · Assets

Set what people may upload

Last updated 18 November 2026

Block or allow file types and set a maximum file size for uploads.

When you finish this guide, your site accepts only the files you want, up to the size you choose.

The rules apply to the Assets file manager, the Assets API and files that visitors upload through your forms. They are checked before a file is stored, so a blocked file never reaches your site.

Open the upload rules

Go to Assets > Configuration. The Upload Restrictions section holds every rule.

Choose a mode

ModeWhat uploadsA file with no extension
DenylistEverything except the extensions you listUploads
AllowlistOnly the extensions you listIs blocked

A new site starts on a denylist that blocks file types that can run code or open as a web page, such as php, exe, js, html and svg.

List the extensions

  1. Click in the extensions box. It is labeled Blocked extensions or Allowed extensions, depending on the mode.
  2. Type an extension, such as pdf, and press Enter. Repeat for each one.

Only the part after the last dot counts, and case does not matter. So photo.JPG counts as jpg, and report.pdf.php counts as php.

Note

The list cannot be empty. An empty allowlist would block every upload.

Set a maximum file size

Enter a whole number of megabytes in Max file size (MB). Leave it empty for no limit of your own. The highest value you can set is 600 MB.

Save

Click Save. To go back to the starting rules, click Reset to Defaults and then Save.

Note

New rules apply to new uploads only. Files already in Assets are not checked again or removed.

Next steps