Associated thumbnail
Last updated
Last updated
In this section, we are requesting the regular expression with which to generate the object icon. The image generated will serve as the object’s ‘presentation image’ in LIBSAFE, since it will be used in most of the object lists and in the object detail.
Several things have to be taken into account regarding the regular expression to be entered and its treatment:
If the regular expression produces more than one result (if it finds more than one file that complies with the expression), the thumbnail generated will correspond to the first one of them.
It is convenient to carry out an analysis on the general structure that the object will have, in order to obtain a regular expression that fits properly.
The starting point of the search for the regular expression will always be the object root.
Here are some examples we can use as a reference:
Any JPG file located in the root directory
^[^(\\|\/)]*\.(j|J)(p|P)(g|G)$
A JPG file with a specific name in any path
^(?:.*(\\|\/){1})?thumbnail\.(j|J)(p|P)(g|G)$
A JPG file with a specific name in a specific path
^miniaturas(\\|\/){1}tif(\\|\/){1}thumbnail\.(j|J)(p|P)(g|G)$