How to Use File Attachments

This help topic is designed to instruct you on the steps needed to set up and use file attachments.

  • iTopia provides a way to attach files to any table record. Files are stored in the database as Binary Large Objects (BLOBs).

  • You may attach many files to each record. The attached files can be downloaded and opened with the proper software. You may access the file attachments through the Details page, or the results section of the Search page.

  • Files can be deleted but they cannot be modified. In order to modify a file, the file needs to be downloaded, deleted from the record, and reuploaded once it has been modified.

  • If you delete a record with attached files, the attached files will also be deleted.

The following subtopics (in the sections below) are available:


Configuring File Attachments for a Table

You may configure file attachments for a table by creating an expression column in the metadata.

If this is the first time the File Attachments feature is used for an application, the following prerequisites need to be satisfied:

  • The attachments table must exist for the application; and,
  • An attachments domain for the application must exist in the domains table.

The following list identifies how to configure file attachments for a table:

  1. Launch the Columns view and select Create.

  2. Enter the database name, and the table name for which you wish to add the File Attachments feature. Enter the column name (e.g. attachments), and click Continue.

  3. Enter the attachments domain in the Domain Name field and add the description literal key (e.g. attachments). Use the Lookup action to facilitate your search.

  4. In the Default Value field, enter a default value of {md.attachment}, as displayed below.

  1. Enter the physical sequence and set the Type flag to 4 - Expression.

  2. Click Submit. Once the expression column is created, it must be personalized in the business views.

  3. Access the view of the table for which you set up the File Attachments feature and select the Personalize action. You may add the File Attachments feature to the Details page or the results section of the Search page.


Back to top

Using the File Attachments Feature from the Results Section of the Search Page

Personalizing the File Attachments feature in the search results allows you to perform the following operations:

  • Query the number of attached files;
  • Query the list of attached files;
  • Open or download a file;
  • Attach a file; and,
  • Delete a file.

The Attachments field displays the number of files currently attached to each record displayed in the search results. If there are no files attached to a record, the Attachments field is set to a hyperlinked value named Add.

If you hover over the number of attachments, a preview window displays the list of attached files.

When a large number of attachments are available for a single record, the preview window includes a scroll bar. Press the Shift key and hover over the number of attachments to force the preview window to stick to the screen, thus enabling you to scroll through the attachments.

Click the value displayed in the Attachments field to interact with the files through the File Attachments widget, as displayed below. When a large number of attachments are available for a given record, the widget includes a scroll bar that enables you to scroll through the attachments.

To open or download a file, click the hyperlink of the file you wish to open or download. The content disposition assigned to the file type in the Internet Media Types resource determines the system's behavior when the hyperlink is clicked.

If you wish to delete an attachment, click the Delete icon (usually, an x) displayed on the right-hand side of the record containing the attached file you want to delete.

The Browse action opens a file explorer in order to let you choose which file to attach. The widget refreshes once the file has been uploaded.


Back to top

Using the File Attachments Feature from the Details Page

Personalizing the File Attachments feature in the Details page allows you to perform the following operations:

  • Query the list of attached files;
  • Open or download a file;
  • Attach a file; and,
  • Delete a file.

The File Attachments feature is rendered as a widget that allows you to interact with the files. It is the same widget that is displayed in the search results when you interact with the attachments of a record. When a large number of attachments are available for a given record, the widget includes a scroll bar that enables you to scroll through the attachments.

To open or download a file, click the hyperlink of the file you wish to open or download. The content disposition assigned to the file type in the Internet Media Types resource determines the system's behavior when the hyperlink is clicked.

If you wish to delete an attachment, click the Delete icon (usually, an x) displayed on the right-hand side of the record containing the attached file you want to delete.

The Browse action opens a file explorer in order to let you choose which file to attach. The widget refreshes once the file has been uploaded.


Back to top

Security Constraints

The File Attachments feature includes the following security constraints:

  • A user with read permission on a given resource may download a file attached to one of that resource's records.

  • A user with create permission on a given resource may attach a file or delete a file attached to one of that resource's records.

  • Attachments cannot be modified. In order to modify an attachment, the file must be downloaded, deleted from EliteSeries, modified locally, and then reuploaded.

  • The maximum size (in megabytes) of uploaded files is defined in the meta.attachment.max.size property in the System Properties field in the environments table.

  • The size of a file attachment must be greater than zero bytes; otherwise, an error message is displayed.

  • By default, you may upload files without an extension. However, an administrator may modify the meta.attachment.extension.required property in the System Properties field in the environments table to enforce adding an extension to file attachments.

 

Back