# File Restrictions

You can restrict the selected files for upload based on predefined rules for their size and/or extension.

## Types of File Restrictions

The Upload supports three types of file restrictions:

* [File extension](https://www.telerik.com/kendo-vue-ui-develop/components/upload/restrictions#file-extension)
* [Maximum file size](https://www.telerik.com/kendo-vue-ui-develop/components/upload/restrictions#maximum-file-size)
* [Minimum file size](https://www.telerik.com/kendo-vue-ui-develop/components/upload/restrictions#minimum-file-size)

### File Extension

You can define the file types that are eligible for upload by using the [`allowedExtensions`](https://www.telerik.com/kendo-vue-ui-develop/components/upload/api/uploadfilerestrictions#allowedextensions) property. The files with extensions which are not included in the list will not be uploaded and the Upload will display them as invalid. The `allowedExtensions` option recognizes entries of both `.type` (for example, `.docx`, `.png`, `.svg`, `.xls`, and others) and `type` (for example, `docx`, `png`, `svg`, `xls`, and others) values.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/upload/restrictions/extension/source.txt)

### Maximum File Size

You can restrict the maximum allowed file size (in bytes) by using the [`maxFileSize`](https://www.telerik.com/kendo-vue-ui-develop/components/upload/api/uploadfilerestrictions#maxfilesize) property. If the selected file exceeds the maximum size, an error message will be displayed.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/upload/restrictions/max-file-size/source.txt)

### Minimum File Size

You can restrict the minimum allowed file size (in bytes) by using the [`minFileSize`](https://www.telerik.com/kendo-vue-ui-develop/components/upload/api/uploadfilerestrictions#minfilesize) property. If the selected file is less than the minimum size, an error message will be displayed.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/upload/restrictions/min-file-size/source.txt)

### Custom Restrictions

You can restrict the file with custom logic by using the [`validateFile`](https://www.telerik.com/kendo-vue-ui-develop/components/upload/api/uploadprops#validatefile) property. For example we can check if the file name contains letter `a` as in the code below.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/upload/restrictions/custom/source.txt)

## Browser Limitations

Internet Explorer versions up to and including version 9 provide no information on the file size. As a result, the Upload restriction for the `minFileSize` and `maxFileSize` options does not work.

## Suggested Links

* [API Reference of the Upload](https://www.telerik.com/kendo-vue-ui-develop/components/upload/api/uploadprops)
