You may import file attachments via the File Import utility. This page describes the way in which you prepare a structure on the file system of the server where you will place the files to be loaded into the ExtraView database. This structure must be accessible by the ExtraView application server. The image and document files will be loaded from there into ExtraView – either into the database or onto a part of the file system maintained by ExtraView, dependent on the value of the behavior setting ATTACHMENT_REPOSITORY_OPT.

Attachment metadata may be specified using similar metadata entries as for importing image and document fields. The attachments are specified in the import file by using the data dictionary name ATTACHMENT as a mapped field, and defining the file name as the value for that column. The remaining metadata entries that can be used are optional, and are defined as follows:

  • EVFI_ALT_TEXT – the description of the attachment, with a default of the file name
  • EVFI_CHARSET – the character set used for displaying the attachment, with a default of UTF-8
  • EVFI_CREATED_BY_USER – the User ID of the user creating the attachment. The default is the User ID of the user running the import
  • EVFI_UPDATED_BY_USER – the last updated user of the attachment, with a default of the User ID of the user running the import
  • EVFI_FILE_NAME – the file name of the attachment, with the default of the actual file name
  • EVFI_MIME_TYPE – the mime type of the attachment. The default is computed by ExtraView from the file’s extension

These metadata fields may be set from the row data that describes the attachment to be imported.

To set the metadata field, the associated dictionary fields, named EVFI_xxx are used to define a column where the metadata values exist.

These field names may be chosen in the File Import Utility to indicate where the metadata values in the row(s) reside. Note that only one set of metadata per row may be specified, and hence importing more than one image/document per row will not permit metadata values unique to the different fields. Import document and image fields is similar to importing file attachments. You may view the example on that page as a model on how to use this feature.

Importing Multiple Attachments for a Single Issue

You may import multiple attachments for a single issue, by delimiting the attachment metadata within the appropriate fields. The delimiter used is defined by the behavior setting named DEFAULT_TEXT_REPORT_DELIMITER. Normally, this is a colon character. For example, the EVFI_FILE_NAME field for an issue may contain:

file_name1:file_name2:file_name3

This implies three separate attachments are going to be uploaded. Similarly, use delimited text in fields such as EVFI_ALT_TEXT to provide separate descriptions for each of the attachments.

Update Option

Attachments may be imported using either the INSERT option or the UPDATE option of the File Import utility.

Validation Option

The validation operation of the File Import function performs the following tests on imported images and documents:

  • The file’s existence and readability
  • If an Image field, whether the file contains an image, so that a thumbnail can be created
  • For metadata

    • the MIME type must be recognized as a valid type
    • the CHARSET must be a valid recognized character set name

The same validation tests are done on the import operation. Validation errors will cause the import of that row to fail. Other rows are not affected, unless they also have errors.