Editing file, picture & hyperlink data
About media data
Files, images, and hyperlinks can be stored in records as File attributes
(sometimes referred to as "embedded media"), Picture attributes,
and Hyperlink attributes.
- File attributes may be used to store data files of up to 500 MB
in size, for example, text files, Adobe PDF files, Microsoft Office
documents, MPEG and MOV video files. The files are stored in the database,
and are known as embedded media. For files larger than 500 MB, we
recommend storing the file outside of the MI database and linking
to it using a hyperlink
attribute. Files larger than 2 GB are not supported.
- Picture attributes may be used to store image files of up to 10
MB in size.
Note that while the maximum file size recommendations
for embedded media (File and Picture attributes) hold for tabular data,
you should be aware that adding lots of files in tabular data can quickly
make datasheets impractical to load and/or edit. This is because editing
tabular data requires fetching all the rows (and their media data) from
the database and saving back again.
To edit file, picture, or hyperlink data
- Ensure that the system is in Edit
Mode.
- On the datasheet of interest, click Edit
this data on the left of the file attribute name. (In a version-controlled
table, this option is only available on unreleased records.)
- For files:
- Click Choose
file to browse and locate the file.
- Select Allow
file contents to be searched to allow the file contents
to be searched when performing searches in MI:Viewer. (This applies
only to file types supported by indexing services, such as Microsoft
Word or PDF files.)
Clear the check box if you want to prevent the file contents,
for example, a spreadsheet of test results, from being searched.
Note that the name and description of file attributes are always
searchable.
- Description:
optionally enter the text you wish to see displayed as
the file identifier on the datasheet. See Specifying
a description below for an example.
- Target: choose where
in the application window you want the file to be displayed when
it is loaded. See Target below for examples
of the different options.
- For hyperlinks:
- Description:
optionally enter the text you wish to see as the hyperlink
identifier on the datasheet. See Specifying
a description below.
- Address: enter the
link URL. If you are using the hyperlink to reference a remote
file on your MI:Server, see Linking
to large files using hyperlinks below to see the specific
format required for the URL.
- Target: choose where
in the application window you want the file to be displayed when
it is loaded. See Target below for examples
of the different options.
- For pictures, click Choose file
to browse and locate the image file.
- (Optional) You may be able to add metadata about the data value,
such as statistical information or notes about the source of the data.
- (Optional) You can add information about any changes that
you make on the Notes
tab.
- Click Save to save all
your changes.
Specifying a description
If a description is entered in the Description
field, then this appears on the datasheet instead of the filename (for
files) or address (for hyperlinks). If no description is provided, a file
is identified on the datasheet by its filename, and a hyperlink by its
address.
When no Description is specified, the filename is used as the link on
the datasheet:
If a Description is specified, this string is used for the link on the
datasheet:
Both the filename and the description will be included in searches;
the file contents will only be searched if the Allow
file contents to be searched option is selected.
Hyperlink description example
Specifying where in the window a file or hyperlink
will be opened (Target)
If the file is of a type that can be opened within the MI:Viewer application
(PDF, text), Target specifies
exactly where the file contents should be displayed.
- Current pane — the file
will open in the pane where you clicked the file link:
- Left browse pane — the
file will open in the Contents tree pane on the left of the MI:Viewer
application:
Right content pane -
the file will open in the main content pane in the MI:Viewer application:
Both panes below toolbar —
the file will open across both the Contents tree pane and the
main content pane in the MI:Viewer application window:
Current window —the
file will open in the whole window/tab:
New window — the
file will open in a new tab or window, outside of MI:Viewer:
Linking
to large files using hyperlinks
Large files can be stored outside the database using a hyperlink attribute
to reference the external ('remote') file. Clicking on the hyperlink will
cause the file to be downloaded to your machine.
To use hyperlinks in this way, your system needs some special configuration:
- The MI Administrator must edit the MI:Viewer configuration file
ViewerSettings.config to specify the location of the
folder where the external files are located, and also set the correct
security permissions on the folder to ensure that MI:Viewer users
can access it. See the GRANTA MI
Administrator's Guide for details.
- The MI Administrator must define a hyperlink attribute in the database
schema with a metadata Key
field that will specify the name and relative location of the remote
file.
To link to an external file
- Ensure that MI:Viewer configuration described above has been done.
- Click Edit
this data on the left of the hyperlink attribute name.
- Description: enter the
text you wish to see displayed as the hyperlink text, in this example
“Database backup”.
- Address: enter the following
string exactly as
shown:
/mi/RemoteFile/Get?attributeId={attributeId}&recordid={recordid}&databaseKey={databaseKey}
- Target: the value of this
field is not used, since the file will be downloaded.
- Key: enter the relative
path to the file from the remote files root folder.
In this example, the external file in this
Large File attribute is specified in a metadata attribute called
Key, and defined as Group1\BigFile1.bak (the file is located in
subfolder Group1 under the root remote
files folder):