
# File Limit Plug-in

> This plug-in allows administrators to place restrictions on the size and type of file created using a specific asset factory.

URL: https://www.hannonhill.com/cascadecms/latest/articles/content-authoring/asset-factories/plugins/file-limit-plug-in.html
category: Content Authoring
article-type: reference
content-kind: article
release-availability: all
tags: authoring, asset-factories
updated: 2026-10-06

## Overview

This plugin limits file assets to a specific size and/or system name.

For example, this plug-in can be configured to limit file extensions to .jpg or .png and the file size to <10MB. If either of those conditions are not satisfied, the asset won't be created and a message will be displayed to the user explaining why.

## Parameters

- **Size** – Files created by this Asset Factory may not be larger than this size (in kilobytes).
- **Filename Regex** – The system name of files created by this Asset Factory must match this regular expression. This is useful for restricting file extensions for documents and images.

> **Note**
>
> This plug-in is applicable to Asset Factories for files only.

> **Note**
>
> This plug-in will supercede [asset naming rules](https://www.hannonhill.com/cascadecms/latest/articles/content-authoring/asset-naming-rules.html) for file assets. To prevent confusion, it's recommended that your regular expression comply with the site's asset naming rules for file assets.

> **Note**
>
> The regex must be PCRE (Perl-compatible regular expressions).
