You may import both documents and images into their respective field types 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.
The fields to be imported into your database are specified with either the first row of the imported file or through the mapping interface described in the previous section. If an image or document display type field is defined as an imported field, then the contents of that column in each row is a filename that points to a file accessible to the ExtraView application server. The file is used to populate the image or document field contents in the target issue.
Image and document fields have the following metadata fields associated with them:
- File name
- Alternate text
- Character set
- Created by user
- Last updated by user
- MIME type
These metadata fields may be set from the row data that updates the image or document field.
To set the metadata field, the associated dictionary fields, named EVFI_xxx are used to define a column where the metadata values exist. There are 12 dictionary entries that represent the image/document metadata: 6 for item fields, and 6 for repeating row fields – those ending in _RR:
- File name: EVFI_FILE_NAME[_RR]
- Alternate text: EVFI_ALT_TEXT[_RR]
- Character set: EVFI_CHARSET[_RR]
- Created by user: EVFI_CREATED_BY_USER[_RR]
- Last updated by user: EVFI_LAST_UPDATED_BY_USER[_RR]
- MIME type: EVFI_MIME_TYPE[_RR]
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.
Example
Header record (on a single row of the import file)
Data record (on a single row of the import file)
In this example, the metadata fields will populate the image field āFRED_IMAGEā when the issue is created.
Default Metadata Values
When metadata is not specified in the field mapping for an IMAGE/DOCUMENT field, the following defaults are applied:
- File name: the file name portion of the full path name of the input image/document file
- Alternate text: the file name
- Character set: UTF-8
- Created by user: the user running the import operation
- Last updated by user: the user running the import operation
- MIME type: computed from the file extension of the file name, using the ExtraView internal mapping
Repeating Rows
Images and documents fields may be imported to repeating rows using the same type of mapping described in the Importing Repeating Row Data page. In this case, there must be repeating row values to set the metadata – this is the purpose of the EVFI_xxx_RR fields. These metadata fields must be used to set the metadata for repeating row image/documents.
Update Option
Images and documents 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 (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.