Attaching Files in Wiki and Self-Service#
Files can now be attached to any records in two main ways:
- As binary data in a BLOB column in the database (_DATA)
- Virtual file in the ‘File Attachments’ directory of the server file system.(_FILE)
Professional Implementation (GUI Widget) #
The new Form Input Component (FIC) is a modified text field, which displays 3 components:- Name and link to open the attached file.
- File chooser action button, which allows users to browse and attach a new file.
- Delete action button, which allows users to delete the attached file.
Add a File Attachment Column to any Table in the Database (Applies for File and Data) 1. Users can add a file attachment column to any table in the database. This is an especially powerful feature as users will be able to attach files to any record for any table in the system, regardless of whether or not they were originally intended to hold file attachments. To do this, the user must first create a media code for the file attachment column or use an existing one in IMEC.
2. The media code needs to be created for the table for which the file is to be attached. In IMFDH, the user will need to add 2 form items to represent the new file attachment column as a form item in the form: 1) Column with the same column name as the media code 2) Column with the same column name as the media code followed by either “_FILE” or a “_DATA”. Adding the “_FILE” column will save attached files to the server file system while adding the “_DATA” column will upload all attached files to the database in the MEDIA_BLOB column of the Media table.
Please note that the form item represented on the form should be the “_FILE” or “_DATA” form items. The other form item should be hidden.
3. Final result should look like this:
Attach Self-Service Implementation (GUI Widget) -The new web item displays 2 components: 1) Name and link to open the attached file. 2) File chooser action button, which allows users to browse and attach a new file. -Clicking on the text link once will open the stored file in a new browser window. -Upon uploading a new file to attach, the FIC will automatically refresh to display the name of the newly uploaded file.
Example of the set up:
Files by Uploading/Downloading Files to/from Server File System (Applies for _FILE only) File can be attached by uploading the files directly into the server file system. In fact, this is actually currently the most common method used in the system. When a file is attached using this method, it is uploaded to the server in the directory specified by the LOAD_DATA_FOLDER site preference and stored in a folder with the name of the table alias of the table of the record for which it is attached.
Attach media files to table records (Professional Implementation only) Users can attach media files to table records via the Media Dialog by clicking on the Show Media button in the form toolbar. In the Media Dialog, the user can insert or update media records associated with the current record in application focus. Show Media Dialog From Toolbar button in red box
Media Dialog showing attached media file for the current Sites record