Attachment Management
SimpleOne supports attaching files to records. See the Attachments article to learn how to upload, download and delete files attached to a record using the portal or agent interfaces. This article provides information on how to configure various aspects of the system related to attachments:
- configure attachment actions in the interface.
- manage attachment records.
- parsing.
- monitor the system logs.
- set the system properties.
- configure access to attachments.
Attachment in interface
Action and Image field
You can attach files to a field of Image type and a record with the attachment action. The action is displayed on forms as the paper clip icon .
The screenshot below illustrates two attachment actions on the record form:
Attachment widget
Attachments can be added via an attachment widget in the agent interface. For this, you need to use the <attachment> SimpleTag within a certain widget instance. It is unnecessary to specify the recordId, tableName attributes for the <attachment> tag located on the page with the form. Therefore, a widget template with an attachment tag will look like this:
<attachment> </attachment>
After adding a widget instance to a form of the agent interface, the standard action in the top right corner of the form will be removed:
You can add files from the clipboard to the widget directly on the form by using Ctrl+V shortcut while hovering over Drag & drop area.
Attachment record
When you upload a file, a record is created in the Attachment (sys_attachment) table. To reach these records, navigate to Attachments → All Attachments.
Attachment record form fields
Field | Mandatory | Description |
---|---|---|
Document record | N | This field is automatically populated with a reference to the record the file is attached to. |
File name | Y | Displays the file name. |
File path | N | Displays the absolute file path on the server. |
Size bytes | N | Displays the file size in bytes. |
MIME content type | Y | Displays the file content type described in the MIME standard. |
Public | N | Select this checkbox to make the attachment public. |
Parsing
Parsing attachment content is possible only if the attachment file size does not exceed 30 MB. The limit is fixed and cannot be modified. If the file is bigger than 30 MB, it will not be indexed.
The attachment parsing process is asynchronous. Within this process, the following event is implemented:
- In the Attachments (sys_attachment) table record, the attachment content parsed from the provided file is placed. The attachment content is populated in the Content field, and the content encoding – in the Encoding field. The content encoding is automatically detected.
Attachment logging
The system logs all operations (except for reading) in the Main Log (sys_log) table. Operations related to attachments have the Source field value equal to Attachment
. Navigate to System Logs → Main Log to view the log.
If any errors or exceptions occur when adding an attachment, they are recorded in the Exception Log (sys_log_exception). Navigate to System Logs → Exception Log to view these records.
See the System Audit article to learn more.
Configure attachment properties
To set up attachment properties, perform the following steps:
- Navigate to System Properties → All Properties.
- Find the required property record in the list and open it.
- Edit the Value field.
- Click Save or Save and exit to apply the changes.
Property | Description |
---|---|
max_files_upload_count | Specify the maximum number of files that can be uploaded. |
max_file_size_upload | Specify the maximum file size (in bytes) that can be uploaded. |
allowed_upload_file_extension | Specify the file types that are allowed for uploading. List the extensions separated by commas without spaces, for example, jpeg,png,pdf . Files of other types will be ignored. To allow all types of files, type [] . |