Advanced Upload Templating#
Setting, Deleting, and Preserving Media Metadata#
With the asset_data PI, media metadata can not only be used for editorial purposes, but it can also be sanitized during the upload process. This gives you control over which metadata is displayed in your published media. There are three parameters for managing media metadata: set, delete, and preserve. The set parameter, mentioned earlier, allows writing editorial content back to the metadata. It has the highest priority, and any content set using the asset_data input field with the set option will be written to the metadata of the respective image, regardless of the deletion settings.
The other two options, delete and preserve, allow you to control which existing metadata should be deleted. To effectively manage published metadata, it is recommended to use the following approach: first, mark the metadata fields for deletion using the delete option, and then use the preserve option to exclude the fields you want to keep. Fields that are directly set with set in another location do not need to be preserved and are generally exempt from deletion.
If you use the following PI options in your upload template, all image metadata will be deleted during upload, except for the copyright information in the EXIF and IPTC metadata formats and any metadata explicitly set with set:
<?imperia asset_data
delete: *:*
preserve: EXIF:copyright, IPTC:CopyrightNotice
?>
Please note that certain metadata formats automatically set some information from the image, making them non-deletable.
Note on the Legacy Direct Drag-and-Drop Upload#
Before imperia 11.4, there was a tabular direct upload that bypassed the workflow and uploaded assets directly into the selected category. A modified version of this direct upload still exists.
If you want to continue uploading files directly to a category without an intermediate step and prioritizing well-maintained titles, copyright notices, and alt text is not essential in your scenario, you can enable this alternative upload by setting MAM_ENABLE_INSTANTUPLOAD = 1 in the system configuration. You can still activate additional fields to a limited extent, similar to the capabilities available before imperia 11.4. Additional input fields can be added via MAM_INSTANTUPLOAD_FIELDS = title:Titel:1,copyright:Copyright:1, where multiple fields can be specified separated by commas. Each input field requires three values: the meta field name (e.g., title), the label (e.g., Titel), and whether it is a required field (e.g., 1).
Custom Input Fields#
In many cases, you may want to combine your own input fields with fields generated by the asset_data PI. To ensure consistent layout for all fields, use the following HTML structure for your custom fields:
<div class="
custom_asset_field_group">
<label for="copyright">Copyright</label>
<input name="IMPERIA:copyright" id="copyright" class="i-custom-field" type="text" />
<span class="hint">Vorname Nachname, Quelle</span>
</div>