Applies to version: 2021.1.x and above; author: Konrad Wojtycza
In WEBCON BPS, it is possible to limit the types of attachments that can be added to workflow instances due to their type and size. This option can be used to block the ability to add potentially dangerous attachments to the Portal such as scripts, executables, spreadsheets with macros. The restriction will be set globally for all applications/processes and all places where you can add an attachment – forms, HotFolders, HotMailBoxes, API. When specifying the attachment size – remember that the IIS server setting is the overriding limitation on the size of the added file.
Type of the attachment
In WEBCON BPS Designer Studio, go to the System settings tab -> Global parameters -> Attachments.
Fig.1. System settings - Attachment section
In the Restriction for adding files field, select one of the available modes:
Fig. 2. Restriction for adding files
By default, the list already contains suggested file extensions which can be reloaded after clicking the “Refresh” button.
Fig. 3. "Do not allow adding attachments with an extension" mode
If a user wants to add a file that is not allowed in the configuration, the message (Fig. 5) will be displayed.
Fig. 4. Selecting an attachment
Fig. 5. Information that appears when trying to add a file that is not allowed
Size of the attachment
The “Define the maximum size of the attachment file” parameter is used to define the maximum size of the added attachment.
Fig. 6. "Define the maximum size of the attached" option
When specifying the attachment size – remember that the IIS server setting is the overriding limitation on the size of the added file. To do this, open the IIS manager and go to the Request filtering.
Fig. 7. Internet Information (IIS) Manager - request filtering
Select the Edit feature settings option.
Fig. 8. request filtering option - Edit Feature Settings
In the “Edit Request Filtering Settings” window, you can define the maximum allowed content length, which indirectly determines the attachment size.
Fig. 9. Edit Feature Settings
Let’s try to attach a file with a size of 19,7MB. The maximum content length has been set to 10MB, the same as in Designer Studio. An error message will appear when you try to add a file.
Fig. 10. The added file (19.7MB)
Fig. 11. Information when you try to add an attachment with a size exceeding the limit set in WEBCON BPS Studio
After changing the attachment size in Designer Studio to 25MB, the 10MB limit set in IIS will still apply, and the user will see an appropriate error message.
Fig. 12. Change the attachment size limit to 25MB in Designer Studio
Fig. 13. Information when trying to add an attachment that exceeds the limit set in the IIS Manager
In practice, if the attachment size in Designer Studio and IIS has been set to 30MB, the maximum attachment size that can be added is 28.6MB. The upper limit of the size for attachments that can be added is 128MB for the current WEBCON BPS version. However, the maximum size that can be set in IIS is 2147MB.