[{TableOfContents }] !!!ATTACHING FILES Files can now be attached to any records in two main ways: *As binary data in a [BLOB] column in the database (_DATA) %%label-primary a _DATA is added the uploaded file will be stored to XXXX_BLOB column / specified table.%%\\ \\ *Virtual file in the ‘File Attachments’ directory of the server file system.(_FILE) %%label-info 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%%\\ \\ *Site Preference ‘ATTACHMENTS FLDR’ will be used to define the generic location where the file will be stored.\\ **E.g. ATTACHMENTS FLDR - E:\Highline\FileAttachments\\ *In java we added logic to save the file in a specific location based on the table alias\\ **E.g. ***For uploading a resume, the files will be stored under E:\Highline\FileAttachments\RES folder\\ ***For Open Enrollment - E:\Highline\FileAttachments\BOEE\\ 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] !!Professional Implementation (GUI Widget) The Form Input Component (FIC) is a modified text field, which displays three 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. [AttachingFile_02.jpg] *Clicking on the text link once or pressing the <Enter> key will open the stored file using the respective default Windows application. For example, if the stored file is a Microsoft Word Document, Microsoft Word will be launched and will open and display the file.\\ \\ *Upon uploading a new file to attach, the FIC will automatically refresh to display the newly uploaded file. Clicking once on the text area will open the uploaded file in the default application viewer. However, this new file will NOT be saved as attached to the record until the form is saved. !!Add a File Attachment Column to any Table in the Database (Applies for File and Data) using IMEC #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]\\ \\ #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]\\ \\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.\\ \\ #Final result should look like this:\\ \\[AttachingFile_05.jpg]\\ \\ %%label-warning 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) *The new web item displays two components:\\a) Name and link to open the attached file.\\b) 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:\\ \\[AttachingFile_06.jpg]\\ \\[AttachingFile_7.jpg]\\ \\[AttachingFile_08.jpg] !!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] !!Attach Media Files to Table Records %%information 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] Media Dialog showing attached media file for the current Sites record\\ [AttachingFile_11.jpg] ---- ![Notes|Edit:Internal.ATTACHING FILES] [{InsertPage page='Internal.ATTACHING FILES' default='Click to create a new notes page'}]