Publishing Actions allow admin users to publish sets of assets to a local or network directory. A publishing action can be triggered manually from the admin interface, or configured to automatically run at a specified interval. If matching assets are already present in the destination folder, then these will not be copied over again (unless a new version of the asset has been uploaded and saved within Asset Bank in the interim).
Creating a 'Publishing Action'
The first step is specify the "Search Criteria" which will define the sets of assets to publish by the action. The search criteria form is similar to the advanced search form except that the list of attributes to show on this form is determined by the default (non-asset-type-specific) View display attribute group not the Advanced Search display attribute group.
When a publishing action is triggered all the assets that match the given publish criteria will be "published".
The filename used to publish the Assets is the Asset 'Id' by default, and can be changed in:
Admin > Attributes > Display Attributes > Publishing
Once you have set the 'Publish Criteria' you can choose which transfer method to use: Simple Copy, FTP, SCP or Asset Bank Copy.
When using Simple Copy, directories can be specified as regular local directories or as UNC paths (e.g. "\\PublishServer\PublishDirectory").
Local publish directories can be constrained using the setting publishing-file-copy-jail-directory (in the ApplicationSettings.properties file) so that every 'publish location' will be automatically set inside this folder.
Admin users must ensure that the Asset Bank service has the correct permissions to create files in the given directory and that the publishing-file-copy-jail-directory setting is set to an ancestor of the directory.
When an Usage Type for resizing is selected the Image Assets will be published in different format size, according with the settings specified in the given Usage Type.
If nothing is selected then the original Asset file will be used instead.
A publish action Attribute used for Subdirectory Name is available to create sub-directories in the top-level director associated with that action. When creating a 'publish action' the admin user will select an attribute - the value of this for a particular asset will be used when that asset is published to determine the name of the subdirectory into which to copy the published images. If the user selects 'Folders' as the attribute to use for the sub-directory name then a directory hierarchy mirroring the folder structure of the assets will be created and assets will be published to the relevant points of that structure based on the folders they are in. If an asset is in multiple folders it will only be published to the sub-directory representing it's first folder.
The Unpublish option specify whether the Assets that no longer match the search criteria should be unpublished (i.e. deleted) when the publish action runs.
If FTP/SCP option is selected then the server details like, server IP, user name, password and the port number need to be provided. When FTP is selected then "Passive mode" is enabled by default. If you wish to use active mode for FTP instead then untick the checkbox for "Passive mode". If you are experiencing connectivity issues due to a firewall you may wish to try unticking the "Passive mode" checkbox.
Please read this article for SCP configuration.
NOTE: The default port numbers are used for the FTP – 21 and SCP – 22 are used, this can be changed depending on the setting of the environment.
Filepath Template (version > 3.1601)
NOTE: Editing this template is only recommended for the technical user (any errors it will have unexpected consequences on the naming and structure of your published files).
The Filepath Template specifies the structure for the output of published files. It can be used to determine the directory naming and whether there is nested directories. It may also be used to determine the file name of the published files.
Permitted template values:
attributeValue: The value of the attribute specified (see above). If no attribute has been specified, this item in the template will be ignored.
usageTypeFormatName: The name of the usage type format passed through. If no usage type has been specified, this item in the template will be ignored.
separator: This will be the appropriate file separator for the platform.
name: The "name" determined via a Display Attribute Group Publish tab). If nothing is defined here it will use the ID of the asset by default.
The default template:
<#if attributeValue?has_content>
${attributeValue}
${separator}
</#if>
<#if usageTypeFormatName?has_content>
${usageTypeFormatName}
${separator}
</#if>
<#if filenameWithoutExtension?has_content>
${filenameWithoutExtension}
</#if>
Where
Display Attribute Group for publishing (as defined in Attributes > Display > Publishing tab) = "Description"
Result:
publish-location/asset-title/small/asset-description.jpg
publish-location/asset-title/medium/asset-description.jpg
publish-location/asset-title/large/asset-description.jpg
Example custom template:
<#if attributeValue?has_content>
${attributeValue}
${separator}
</#if>
<#if filenameWithoutExtension?has_content>
${filenameWithoutExtension}
</#if>
<#if usageTypeFormatName?has_content>
_${usageTypeFormatName}
</#if>
Result:
publish-location/asset-title/asset-description_small.jpg
publish-location/asset-title/asset-description_medium.jpg
publish-location/asset-title/asset-description_large.jpg
Scheduling
Versions post 3.1396: Clicking the 'Scheduled?' checkbox will enable you to enter the following options to schedule the publishing action to run automatically at set intervals:
- Start Time - the first time to run the sync
- Interval & Interval Type - the type of interval between each sync (day, hour or minute) and the number of each interval type (so entering 2 in the text box and picking hour from the drop down list will result in the sync running every 2 hours).
Versions pre 3.1396: Clicking the 'Run Daily' checkbox will run the action at a specified time (in the setting run-publishing-actions-hour-of-day) daily.
What happens when a Publishing Action "changes"?
If one of the publishing options changes (i.e. Usage Type, Subdirectory, Publish Location or Publish filename) then the published Assets path will be affected the next time the action runs.
When re-publishing the "new versions" Asset Bank will automatically delete the "old versions" (unless you have changed the Transfer Method).
Note: if you want to apply your changes to all published Assets you must manually run a "full" publish action.
Embedding attribute values in metadata fields
If you want the 'download' embedded metadata mappings to be used to embed attribute values in the published asset files, set the setting publishing-embed-metadata=true (available from Asset Bank version 3.1436).
What happens when the Lightbox Publishing Template changes?
When saving changes to the Lightbox publishing template, all existing published lightboxes are re-published. If users selected specific sizes when publishing their lightboxes, they will be retained if the same usage type is used in the template. If the usage type changes, then the lightboxes will use the new template usage type sizes which could mean adding the original file to existing published lightboxes even if it wasn't published before.
Comments
0 comments
Please sign in to leave a comment.