File uploads

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Define Forms > Form Controls >

File uploads

Use

The File upload control is used to upload and attach files to the application.

 

Considerations

A single File attribute may store several files.

The maximum allowed size (in bytes) of files to be uploaded is defined in the Environment Configuration. However, you can define a customized maximum file size.

Nonetheless, Bizagi only allows file sizes up to 2,147,483,647 bytes. (Almost 2 GB)

You can define the maximum number of files to be uploaded in a single File attribute and also if the uploaded files can be deleted.

You can define the valid extensions of files to be uploaded.

You may enable the send as attachment icon, to provide end users with a quick option to send files by e-mail.

Uploaded files are related to the case to which they are attached. They are neither viewed nor shared between cases.

If you need to copy Files from one attribute to another, refer to How to manipulate Files using expressions.

 

 

Related to attribute types

This control is related to File type attributes.

 

Properties

The following are exclusive properties for the File upload control:

 

Advanced tab

 

PROPERTY

DESCRIPTION

Allow Delete

This property enables/disables the option to delete uploaded files.

Max files

Defines the maximum number of files that can be uploaded to a control.

Valid Extensions

Defines the allowed file extensions for uploaded files. Separate different extensions using a semicolon. (e.g., doc; xls; png).

Maximum Size (bytes)

Defines the maximum size (in bytes) that a file can have before it is deemed unsuitable for an upload.

Consider the next table in order to convert to bytes the most common units of measurement for data storage

MEASUREMENT

BYTES

1 KB (Kilobyte)

1.024

1 MB (Megabyte)

1.048.576

1 GB (Gigabyte)

1.073.741.824

Enable "send as attachment" icon

Shows an icon for end users to easily send the file as an attachment in an e-mail.

 

note_pin

Clicking the Set to default value icon will reset the properties.

 

Example

In a Purchase Request Process, end users need to upload a Purchase Order once the request has been approved.

A File upload Control is needed in the form to be able to upload the file.

The File upload Control must comply with the following conditions:

 

To avoid duplicities and mistakes, stipulate that only one file can be uploaded.

To ensure integrity of the document, purchase orders can only be uploaded in PDF  format.

The maximum size allowed for the document is 2,000 bytes.

It is desirable to allow the end user to delete the file in the event that a mistake is made.

 

1.  You need a File-type attribute related to the Process Entity. In this example we will create one called Purchase Order.

 

Forms Components136

 

2. On the Form where the Purchase Order has to be uploaded, drag and drop the Purchase Order file-type attribute from the data model. This will be interpreted automatically in the form as a File upload control.

 

Forms Components39

 

3. Only one file can be uploaded in the control. To configure this stipulation go to the Advanced tab and type "1" in the Max files property.

 

Forms Components40

 

4. In the Valid Extensions property type pdf in order to restrict the uploaded file to pdf format.

 

Forms Components41

 

5. Define the maximum size allowed typing 400000 ≈ 390 Kb in the Maximum size property.

 

 

Forms Components42

 

 

6. Finally enable the Allow delete property in order to allow the delete option.

 

Forms Components43

 

Click the Upload icon to attach a file. A new window will display to search and select the desired file.

 

Forms Components48

 

When the end user reaches the maximum number of files to upload, the upload Icon will no longer be visible.

 

 

Forms Components137

 

When you are uploading a document, only PDF files will be available for selection.

 

Forms Components49

 

If you try uploading a file larger than 400000 bytes the following validation will be displayed.

 

 

Forms Components138

 

Finally note you can delete the uploaded file by clicking the Delete icon (Forms Components249) that displays when hovering the mouse pointer over the file.

 

Forms Components44