In ScriptCase, when we define a field as upload type in a Form, it is extremely important to define the **Extensions allowed** for this field.

This setting makes these fields accept only as installation in the configuration, prevented or uploading unwanted files.

List of upload type fields:

![](//img.zohostatic.com/zde/static/images/file.png)

*- Image (File Name);*

*- Image (Database);*

*- Document (File Name);*

*- Document (Database)*

For that, we will see below how to define and configure these extensions in a very simple way, to guarantee more security for the applications developed in ScriptCase:

1 - In the Form application, go to the left side menu of this application, more precisely in the option "Fields -> Your Field", and then choose the field type, which can be any of the 4 (four) mentioned above:

![](https://help.scriptcase.net/galleryDocuments/edbsn225500de2fa08faf7e187c4df77760848e4f3be6290f026d1f62819cbdb1d8c5cfe6ce0e4beb881472480e2db707c30b?inline=true)![](https://help.scriptcase.net/galleryDocuments/edbsn317adfb574eabfd166e504003f6015ee27f95820652f5525558d0d2de26a34b7b9fe2edf8acedf8a4e1f252db1d4aeea?inline=true)

2 - Once that is done, the screen will open with all the possible configurations to be carried out in the field. We are interested in the "Extensions and upload size" option, as shown in the image below:

![](https://help.scriptcase.net/galleryDocuments/edbsn0df0892e73c681ead0dad97a57ef9a65e97fb567c93e328594361f5686a5afcbf28bf0eb670560f98af9636844e60532?inline=true)

3 - When defining the extents, it is also possible to add a maximum size for each of them, using the following units: bytes, KB, MB or GB.

Multiple extensions can be defined by clicking the Add Extension button or entering a list separated by ' ; '. For example: **jpeg;png;gif**

![](https://help.scriptcase.net/galleryDocuments/edbsn0df0892e73c681ead0dad97a57ef9a652b6841407fbe1f7986b4fd9f5bcefb7670bfcd50d61a2f627221d03d8948af76?inline=true)

**OR**

![](https://help.scriptcase.net/galleryDocuments/edbsnae2595f1d20c53c94c03048e548cad8ff6654d270d1a059be234e4a77428b675a5f52cb04963a7ed995f08c7218c5c6a?inline=true)

4 - Once that is done, just click on "Save application", generate its source code, and run it to test the new rules defined for this field.

![](https://help.scriptcase.net/galleryDocuments/edbsn84a1fe48a557247e1ad82fc6f671182e8bbb6de27ff26f03f90dd53e420c65e36c0de441e28dfa28fa215fcbf6f206b3?inline=true)

![](//img.zohostatic.com/zde/static/images/exclamation.png)

***If you already have your application in production and have not defined the extensions for the Image and Document fields cited at the beginning of this article, just define it following the entire step-by-step above, and then publish only this application again, so that it can be safe and free of uploads of files of any kind.***