MM5.6 Unified Crop Connector
The Embedded Unified Crop Connector requires MM 5.6
Integration Digizuite DAM crop featue into almost any other application using the Unified Crop Connector. It will give you a head start on development efforts and reduce both implementation time and risk.
Insert into any Host Application
The Unified Crop Connector can be inserted into any host application as an iframe to easily provide access to an asset and the crop functionallity.
The url syntax for accessing the crop feature for a specific asset is.https://[customer-mediamamanger-url]/embedded/crop/[assetid]?embedded=true&accessKey=[valid accesskey]
Then you see the below view.
You can read about the crop functionnaity here MM5.6 Asset editing (crop and trim)
Roles
The user behind the accesskey, must have the following roles and rights.
Features in MM | Roles | Rights |
---|---|---|
Crop (share it via email) | Asset_Can_Crop | Ā |
Crop + Replace original asset with crop + Restore to an older version of an asset | Asset_Can_Crop Asset_Can_Replace | Write access to the asset Write access to the Uploads folderĀ OR the Content folder (The option to restore requires "write access" to the Uploads folder) |
Crop + Make new child asset | Asset_Can_Crop Asset_Can_Revise | Write access to the asset Write access to the Uploads folder OR the Content folder |
Listening to events
The Unified Crop Connector also posts a message. The 3 important message types are:
CropInitialized
- So you know it is the Digizuite Iframe.CropDone
- When the crop is done.Cancel
- When a user clicks on the cancel button.
As mentioned above, the iframe will post messages to its parent / host application. Listening to these events are what makes the magic. It can be done in different ways and most modern frameworks have ways for handling it. But since all are JavaScript frameworks then the most basic way in any kind of application would be to use āaddEventListenerā.
Ā
window.addEventListener("message", (event) => {
if (event && event.data && event.data.messageType) {
.......
}
}, false);
Ā