Overview
Version
| Report Server Version | Functional Change |
|---|---|
| 11.0 | - |
Function Description
File Widget is used to upload files. It does not support parameter application and can only be used in data entry preview. In a data entry report, you can upload files via this widget. Click the delete icon to remove unwanted attachments, or click the file name to download uploaded attachments.
Note:The download function is not supported on mobile terminals.

Function Description
Widget Adding
Select a cell, click Widget Setting on the right attribute panel, and select File Widget from the Select Widget drop-down list.

Attribute
The following figure shows the Attribute setting page of the File Widget.

The following table describes each attribute setting item in detail.
| Category | Setting Item | Introduction |
|---|---|---|
| Basic | Widget Name | Widget Name allows you to set the widget name. The widget name, which needs to be entered manually, is usually used together with parameters. For example, you can pass the widget value to the corresponding parameter after obtaining a widget by the widget name. Widget Name is empty by default. |
| Available | Available allows you to determine whether the widget is available for use. If you select Available, the widget can be edited during data entry. If you deselect Available, the widget is grayed out and cannot be edited during data entry. Available is selected by default. | |
| Visible | Visible allows you to determine whether the widget is visible. If you select Visible, the widget is displayed on the page during data entry. If you deselect Visible, the widget is not displayed on the page during data entry. Visible is selected by default. | |
| Advanced | Only Support Single File Upload | Only Support Single File Upload specifies the number of files allowed to be uploaded. When Only Support Single File Upload is selected, only one file can be uploaded at a time, and if the uploaded file is an image, it will be displayed directly in the cell. When this item is unselected, multiple files can be uploaded at a time, but uploaded images cannot be displayed in the cell. |
| File Type | File Type sets the allowed file types for upload. There are 5 options: All Files, txt, pdf, jpg,png,gif, and doc,xls,ppt. Selecting All Files allows all file types to be uploaded. By default, no option is selected. Note:File type validation is also affected by the security protection settings of the decision-making platform. For details, see Security Protection. | |
| Size Limit | Size Limit sets the maximum allowed file size, in KB. | |
| Validation | Allow Null | Allow Null specifies whether the widget can be left unselected. When Allow Null is selected, the widget can be left unselected. When Allow Null is unselected, a prompt appears during data entry validation and submission if the widget is left unselected. By default, Allow Null is selected. |
| Error Tip | Error Tip appears when Allow Null is unselected, allowing you to customize the prompt message. By default, Can not be null is displayed. |
Event
Click the Widget Setting icon on the right panel. On the Event tab of the Widget Setting panel, you can add events to the widget to achieve certain effects. Two events, namely, After Initialization and After Uploading, are available for the File Widget, as shown in the following figure.

Select an event and add the event content. The event response methods supported by the File Widget include JavaScript, Summit to Database, Send Email, Export Event, and Mobile Pop-up, as shown in the following figure.

You can select and add the corresponding event response method. For details about differences among different response methods, see Event Response Method.
Mobile Terminal
| Report Server Version | App Version | HTML5 Mobile Display Plugin Version |
|---|---|---|
| 11.0 | V10.1 | V6.1 |
The File Widget supports camera upload on mobile devices in the versions listed above and later versions.
Note:1. When taking a photo, camera permission must be enabled. If camera permission is not enabled, a message will pop up, indicating no permission.
2. To ensure the display quality of uploaded files on mobile devices, it is recommended that cells with a File Widget be enlarged.

Supported upload methods include Allow Snapshot and Selection from Album and Allow Snapshot Only. For detailed usage, see [General]Mobile Photo Upload.
Photo upload:

Notes
1. The File Widget cannot be used as a parameter widget.
2. Uploaded files cannot be saved in data entry drafts.
3. When selecting multiple files for upload, Firefox and Chrome browsers allow you to select multiple files at once, while Internet Explorer only allows one file per selection. However, files uploaded later will not overwrite previously uploaded files.
4. When using the File Widget to upload files of a supported type, if an upload blocked error shown in the following figure occurs, you can log in to the decision-making platform as an admin and then go to System Management > Security Management > Security and disable File Upload Verification.


Alternatively, you can follow the instructions in Security Protection to modify the supported file types for upload.

Application Example
The following table introduces how to apply the File Widget.
| Application Scenario | Actual Effect |
|---|---|
Scenario description: With the File Widget, you can insert images into a report. Help document: | ![]() |
Scenario description: With the File Widget, you can save small files such as TXT and Excel directly to the database, and then download these files from the report. Help document: | ![]() |