Image Sources

Located at DrEdition: "Settings" -> "Image Sources" -> "Add" or choose an existing Image Source.

An image source is used to give DrEdition access to images of your CMS/image database. DrEdition expects the image source to return JSON data, but it has few requirements to how your data is structured, which is handled by the mapper function.

Endpoint authentication

Aptoma products are running in the cloud (SaaS), and thus all auxiliary systems that need to integrate to Aptoma services needs to be available on the internet (i.e. not only behind a specific firewall).

DrEdition allows you to set custom headers in the request sent to your system when authentication is needed to protect sensitive data.

IP whitelisting our services is not an option, as our services does not have, and cannot have, static IP addresses.

The JSON should as a minimum contain the image title, url, and thumbnail for each image in the list. The endpoint should preferably have text search and filter capabilities to let editors search for images more easily.

Image Sources have a URI template, optional default parameters, and a Response Function.

Images Sources, including a Response Function (which are all described below) are the only required setup to get started with DrEdition. It is quite comprehensively designed to make maintenance scalable, so all below steps are needed.

The upload/search button (upper left corner) for an article in DrEdition
The image upload/search dialog is based on Image Sources

Defining an Image Source

A Image Source requires a URI Template. Each parameter can receive a default setting, or be defined as {INPUT}. Defining a parameter as {INPUT} automatically adds an advanced search option in DrEdition where editorial staff can enter values.

Response Functions: Normalising data from Image Source

Located at DrEdition: "Settings" -> "Image Sources" -> Choose an image source.

DrEdition requires the Image Source to return data in JSON format.

You do not need to worry about data structure of the Image Source, though, as DrEdition allows you to define mapper functions to normalise data for use in a DrEdition context.

Response Functions are thus defined on the Image Source (Settings -> Image Sources). To give you a sense of how a mapper function can be setup, here's a partial example.

/* globals response */
'use strict';
‚Äč
return response.body.map((item) => {
return {
title: item.title,
url: item.url,
thumbnailUrl: item.thumbnailUrl
};
});