arrow-down

FotoWare Integration Application Documentation

Contents

FotoWare Integration Application Documentation

Introduction

The Enonic XP integration with FotoWare is made in such a way you may import from multiple FotoWare sites and/or even multiple times from the same FotoWare site.

For example you might want to import Images, Videos and Documents separately.

Configuration

Notice "mysite" in the example configuration below. It’s used as a unique key for a FotoWare site. When defining imports you have to use the same key.

com.enonic.app.fotoware.cfg
sites.MyInventedSiteId.clientId = abcd (1)
sites.MyInventedSiteId.clientSecret = abcd (2)
sites.MyInventedSiteId.url = https://mysite.fotoware.cloud (3)
#sites.MyInventedSiteId.archiveName = 5000-All-files (4)
#sites.MyInventedSiteId.allowWebhookFromIp = 127.0.0.1,127.0.0.2 (5)

#sites.MyInventedSiteId.properties.displayName = onCreate (6)
#sites.MyInventedSiteId.properties.artist = ifChanged
#sites.MyInventedSiteId.properties.copyright = overwrite
#sites.MyInventedSiteId.properties.tags = ifChanged
#sites.MyInventedSiteId.properties.description = ifChanged

imports.MyInventedImportId.site = MyInventedSiteId (7)
imports.MyInventedImportId.project = default (8)
imports.MyInventedImportId.path = Images from FotoWare (9)
#imports.MyInventedImportId.query = fn:*.jpg|fn:*.png (10)
#imports.MyInventedImportId.rendition = 4096 max width (11)
1 OAuth 2.0 Client ID
2 OAuth 2.0 Client Secret
3 Url of your FotoWare site.
4 What is the name of the magic archive that contains all the files. Default is 5000-All-files. Used to be 5000-Archive.
5 Allow receiving webhooks from these IP addresses. Defaults to localhost.
6 Choose when to update properties to allow changing them on Enonic side. onCreate means only when media created in Enonic XP. ifChanged means when changed in FotoWare. overwrite always uses the FotoWare value.
7 Which fotoware site configuration to import from.
8 Which Enonic XP Project to import to.
9 Which path within the Enonic XP Project to import to. Defaults to fotoware.
10 Which query to use when finding what to import. Defaults to fn:*.gif|fn:*.jpg|fn:*.jpeg|fn:*.png|fn:*.svg.
11 Name of rendition to use when importing. If the rendition is not supported by an asset type Original File is used. Default is Original File.

Renditions = Processing Profiles

Sometimes you don’t want to import the orignal images. This can be achieved by creating a Processing Profile.

In order to use a Processing Profile on the main Archive (5000-All-Files) you have to make a Processing Profile Set and include the Processing Profile you created in that profile. This can be done in the FotoWare Site Configuration/Workflow/Processing Profiles. You can also add your Processing Profile to the default Processing Profile Set.

Then you have to make sure that the main archive uses the Processing Profile Set which includes the Processing Profile you want. Open the main archive and click the settings icon, then go to the Export and Import tab and select a Processing Profile under Allow users to select processing profile.

Finally you have to input that Processing Profile name in the Enonic XP Fotoware Integration Application Configuration under the configuration option rendition as documented above.

Webhooks

There are currently 3 webhook API endpoints available:

Where you can reach them depends on your vhost configuration.

There is also an endpoint which just gives you a webpage with an icon, so you can test from a webbrowser what url is correct.

When you have found the correct url, you need to configure webhooks on your FotoWare site: https://mysite.fotoware.cloud.

Remote addresses

In order to protect against attacks you have to configure a whitelist of IP addresses from which to allow webhook requests.

See the Configuration section above.

Known Issues

  • When renaming a file on the FotoWare server, the received asset modified doesn’t contain information about the new filename. So we are unable to perform the rename on the Enonic XP side.

  • When duplicating a file on the FotoWare server no asset ingested is sent.

  • When moving a file on the FotoWare server, it actually make a copy, but no asset ingested nor asset modified is sent.

  • Moving an image outside the sync "folder" in Enonic, decouples that image, so that next sync will create a new image withing the sync "folder".

Contents