ATTACHING FILES

ATTACHING FILES#

Files can now be attached to any records in two main ways:

a _DATA is added the uploaded file will be stored to XXXX_BLOB column / specified table.

a _FILE is added the uploaded file will be stored on the server file system. A record will also be added to specified table with File Name populated but the XXXX_BLOB column will be null

The file name in media table is populated with the uploaded file name. Each uploaded file will use the Reference ID and Media code ID in front of the file name to make it distinct (Eg 14736_148_FileName).

AttachingFile_01.jpg(info)

Professional Implementation (GUI Widget) #

The Form Input Component (FIC) is a modified text field, which displays three 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.
  3. Delete action button, which allows users to delete the attached file.

AttachingFile_02.jpg(info)

Add a File Attachment Column to any Table in the Database (Applies for File and Data) using IMEC#

  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.

    AttachingFile_03.jpg(info)

  2. The media code needs to be created for the table for which the file is to be attached. In IMFD, the user will need to add two form items to represent the new file attachment column as a form item in the form:

    a) Column with the same column name as the media code.

    b) 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.

    AttachingFile_03.jpg(info)

    Please note that the form item represented on the form should be the “_FILE” or “_DATA” form items (Not both). The other form item should be hidden.

  3. Final result should look like this:

    AttachingFile_05.jpg(info)

Deleting an uploaded file will also delete the record from media table and/or the file from the file system (file attachment folder)

Attach Self-Service Implementation (GUI Widget) #

Example of the set up:

AttachingFile_06.jpg(info)

AttachingFile_7.jpg(info)

AttachingFile_08.jpg(info)

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.

AttachingFile_09.jpg(info)

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
AttachingFile_10.jpg(info)

Media Dialog showing attached media file for the current Sites record
AttachingFile_11.jpg(info)


Notes#

Click to create a new notes page