Our standard API connection simplifies your API work when integrating Mediaflow with a CMS platform or other platforms where the purpose is to download files and/or embed video clips from Mediaflow. This also includes the File Selector integration guide.
Workflow for the user
This API connection includes a workflow where the user in your platform can choose to download files that are copied to the platform's own storage space. Alternatively, users can choose to embed video clips on a page. Downloaded files are registered in Mediaflow usage handler that makes it easy to track where files are used.
Integration Kit for downloading images and embedding video
Since the majority of the functionality in this kind of standard integration involves mounting files, we recommend that you use our integration kit. It simplifies your work as it consists of a "File Selector" that handles the image selection step for you. The File Selector enables the user to browse folders, search for files (with or without our AI support for keywords), review metadata for files, select files, and crop images, or alternatively embed video files.
Example of Mediaflows File Selector:
Access to files in Mediaflow from your system
To control which folders should be visible to users in your target system, a User group will be created within Mediaflow for this type of integration. This is a standard way in Mediaflow to allow access to files for user groups within the system, to integrations, and also to Mediaflow's portals, which users are accustomed to.
Standardised Configuration in Mediaflow
Download presets
In Mediaflow, admins can configure which download presets may be selected by users in your platform to crop the images in appropriate formats (for example web formats for CMS like jpg and png).
GDPR restrictions
The File Selector will by default automatically ignore none GDPR compliant files. (Note that Admins can globally set whether the restrictions in our GDPR module should be ignored for all integrations.)
Usage Reporting
When a file is mounted in your target system, we also recommend that you utilise Mediaflow's functionality for usage reporting. This means that when a file is mounted, your platform sends back information to Mediaflow about where this file is used as a URL including name and date (also preferably when a assets is unpublished).
Uploading files to Mediaflow from the integration (optional)
Mediaflow naturally features generic ways to easily upload files by logged in users and also via Mediaflow Web Share. However it is sometimes needed to build an upload functionality directly from the integration. We recommend this to be built by creating an interface for the user to select a folder to upload to. This can be done through API calls listing folders. If a default folder needs to be selected, the folder-id needs to be set in the integration configuration. In that case we recommend that you build a fallback in case this folder may be deleted by a user.
Upload limit
Note that there is a 2 GB limit to uploading files.
Checklist - Features to implement in your system
The ability to add API/integration keys in settings
Implementing a settings page for the integration so that users/administrators can save keys and set certain global settings for the integration. The fields needed are ClientID, ClientSecret and Refresh token (also known as ServerKey).
Implement usage reporting functionality
When your platform sends back usage information to Mediaflow, it needs to include an URL to the page, a name of the user and date stamp. Preferably this should also be the case when the assets in unpublished so that the user in Mediaflow can see that the image is no longer published. To implement this you need to save the usage-id returned when the original usage call was made.
AI Search
You can see if you has AI Search activated by checking if ai_assisted_search_default exists in the response from /users/me?fields=activeModules. Then you can activate it in the search by adding to the search POST body ai: true|false.
Alt text functionality
In Mediaflow there is a dedicated alt text field. You can choose to configure how this is used in the integration. If the field should be automatically set from Mediaflow and if it’s compulsory. It's also possible to implement this as a global setting. With Mediaflow’s AI feature for alt texts, you get suggestions for image alt texts with just one click. You can choose the language you want the alt text in.
Upload functionality (optional)
Functionality to upload files and an interface for choosing a folder to upload to. If you choose to implement the possibility for admins to set a default folder for upload in Mediaflow, admins will need to set the folder-id. Folder-id is visible when a folder is selected.
Saving downloaded files in your system
Global setting for where imported images are saved (depending on how you system works best). E.g. all imported files are automatically saved in a folder “Images from Mediaflow” alternatively images are saved on the page where the image is placed. You can also implement this to be a user choice.
Input types for images or video
Depending on the system there are a few different types of inputs we recommend to implement.
Custom data type
Many systems have some sort of data types that can be configured to build up a page or a block. You can build a data type that can either insert both video and image or split them into two different datatypes. This is the most common use case for integration.
WYSIWYG insert button
It’s also common to implement a custom Mediaflow button in the systems WYSIWIG editor to be able to insert images and videos directly to the text of pages and articles.
Media section insert
If your CMS or target integration systems supports this it can be good to have a way to insert images through your systems native File Selector. Since this will make it easier for users to use the already existing systems. If this is not possible, it will not be possible to replace existing image consisting of the onative image data type without removing and inserting the new data type (that support inserting images from Mediaflow).
Ability to detect the size of image placeholders
Some systems support setting up image placeholders with specific dimensions. You can then send this information dynamically to the File Selector so that it knows what size an image should be cropped to. This eliminates the need to predefine download format within Mediaflow, instead, the cropper dynamically adjusts the cropper correctly when selecting to mount an image in an image placeholder.
Embed video settings
Video can be embedded as preferably Javascript or iframe. Implement a global setting for this or let the user choose embed type.
Allowed image and video types
It’s necessary to globally set which file types (images and videos) to be shown in the file selector. However some customers might have specific needs. It may be wise to let the admin set custom allowed file formats. Note that you can even allow formats that your system does not support, for example .tif files, since they will be converted to one of the allowed download presets admins allowed for your system in Mediaflow.
NOTE: PDF files are not supported.
Technical information
Technical integration guide
File Selector integration kit (JavaScript based)
Click here for more Information
Complete API documentation
This is not normally needed for a standard integration but you may need to implement som special features using the other API endpoints.