Control - File
The file field is a powerful tool that allows users to directly upload multiple files (such as documents, images, etc.) to a record. In order to meet the needs and preferences of different users, the system provides custom options for the display and upload restrictions of attachments.
1. Display modes for images
There are 4 display modes for images, thumbnail, card, list and tile.
In the file field, the display modes for images are highly flexible, offering four different display modes for various application scenarios and aesthetic needs. These four display modes are: thumbnail, card, list, and poster.
Example:
If the poster display mode is chosen for images, the full image will be displayed, taking up a large amount of space, and only image files can be uploaded and displayed.
In addition, the system also provides an option to "Display Filenames in cells". When users check this option, in the table view, the file field will not only display the thumbnail but also show the file name next to the thumbnail. In this way, users can quickly identify the name and content of the file without opening it, greatly improving work efficiency and convenience. As shown below:
2. Restrictions on file types
System-restricted file types
Files with the following extensions are not allowed to be uploaded: .exe, .vbs, .bat, .com, .cmd, .url. Please note that the file extensions are case-insensitive.
The system supports customizing the file types allowed to be uploaded with case-insensitive extensions as well.
3. Files sorting
The system provides three flexible ways of sorting attachments: new in front (files uploaded later will be displayed in front); old in front (files uploaded earlier will be displayed in front); and custom sorting. Under custom sorting, users can adjust the order of attachments by dragging and dropping.
4. Restrictions on the number and size of uploaded files
For local files and files from Knowledge, select up to 100 files each at a time.
The minimum number of attachments that can be uploaded in the attachment field is 1 and up to 100, if it exceeds 100, no more uploads will be allowed.
The file field allows you to limit the size of a single file to a minimum of 0.01M and a maximum of 4G. Users can set suitable file size limits in the file field according to their actual needs.
5. Verify file names
When uploading attachments, file names can be standardized by setting regular expressions. Files with names that do not comply will not be allowed to be uploaded.
Extract file names from file fields
The file names in the file field can be used as default values for text fields, making it easier to search by file name. When setting default values for text fields, choose the file field. When files are uploaded in the file field, all file names will be written into the text field.
6. Operations on files
Allow upload: If unchecked, new attachments cannot be uploaded.
Allow Deletion: If unchecked, uploaded attachments cannot be deleted. Newly added attachments can be deleted before saving.
Allow download:
If unchecked, attachments cannot be downloaded. There are multiple settings that allow users to configure whether attachments can be downloaded. The priority of settings that do not allow downloads is: field settings > function switch > user's permission configuration.
If "Download all" is checked, users can download all files in this file field of the record with one click.
Operations when editing attachments:
7. Watermarks for images
When previewing and downloading images, users can customize watermarks. Watermarks for documents are not supported for now.
Enable and set the watermark
When setting a watermark, users can enter fixed text or choose field values, with a maximum display of 100 characters.
- Field values (only support: Text, Email, Telephone)
- Current user: show the name of the current user
- Current date when downloading or previewing images: yyyyMMdd (20231014)
When the watermark will be shown
- When previewing images
- When downloading or exporting images
Image types that support watermarks
jpeg、png、tiff、bmp、heic
File size limit
- The file size limit for a single watermarked file is 20MB. Files larger than 20MB cannot be watermarked.
8. Online document editing
HAP utilizes WPS online document preview and editing services, supporting collaborative online editing of files in the file field.
Document editing
When previewing a document, for editable files, there will display an "Online Editing" button. Click on this button to start online editing.
Save versions
After making modifications, click on the "Menu" button, then "Save". After saving the version, the file field and logs will be updated, and trigger related workflows.
Users can also save the version through the shortcut key ctrl(command) + S
or by "closing the editing page".
During online editing, users do not need to register for a WPS account; instead, they use their HAP account. In the document editing logs or comments, it will display the name of the HAP account.
File formats
The online preview and editing service support the four major document types, including Document, Excel, Presentation, and PDF, compatible with 95% of document formats on the market.
Document Type | Extensions | Description |
---|---|---|
Document | doc, dot, wps, wpt, docx, dotx, docm, dotm、rtf、txt | Files in rtf and txt formats are only supported for preview and not for editing. |
Excel | xls, xlt, et, xlsx, xltx, csv, xlsm, xltm, ett | Files in csv format are only supported for preview and not for editing. |
Presentation | ppt, pptx, pptm, ppsx, ppsm, pps, potx, potm, dpt, dps, pot | |
pdf, ofd |
When is online editing available
Enable "Online document editing" when setting up the file field.
If "You can only edit your own uploaded attachment" is also checked, then only the owner of the file can edit it.
The file field is editable.
If the file field is set to read-only when setting role permissions, field properties, business rules, control events, etc., the document cannot be edited online.
The file size does not exceed 100MB.
Editing documents in the file field of a record is only available through accessing the application (including external portals). Other ways of accessing documents such as files in record discussions, posts, and Knowledge, as well as viewing files through shared links, do not support online document editing.
Up to 10 users can simultaneously edit online.
Device compatibility
WPS online preview and editing services are more stable in the following browsers, with some functions possibly limited in other browsers.
Platform | Supported Browsers | Description |
---|---|---|
Windows | Chrome, IE11 | Chrome ≥ 80, IE11 (preview only, editing not fully guaranteed) |
Mac OSX | Chrome, Safari | Chrome ≥ 80 |
iOS | Safari, QQ Built-in Browser, QQ Mini Program, WeChat Built-in Browser, WeChat Mini Program | iOS ≥ 11 |
Android | QQ Built-in Browser, QQ Mini Program, WeChat Built-in Browser, WeChat Mini Program | Android ≥ 7 |
9. Mobile device configuration
Automatically compress images
If checked, automatically compress images when uploading on mobile app and mobile web (H5).
Disable uploading from the desktop client
If checked, uploading files from PC browser is not allowed, but can be done on mobile app and H5 (mini programs and mobile browser).
Disable the photo album: If checked, users can only take photos and upload them on mobile app.
Add a photo watermark: It is only available when taking photos and uploading them on mobile app and H5.
Get input before displaying the form: When adding a new record on mobile app, it asks to enable the camera to take a photo and upload it first, and then fill in other fields after uploading.
Submit the form directly after obtaining: When adding a new record on mobile app, the record is automatically submitted once the photo is taken and uploaded.
If you want users to take photos and upload them only on mobile app and not upload images on PC, set it as follows:
Have questions about this article? Send us feedback