The integration with Umbraco enables publishing of images and videos available in Mediaflow directly within Umbraco’s editing mode. A fantastic way for web editors to always have access to files that are GDPR-compliant, have correct alt texts, and videos that are accessibility-adapted.
Settings in Mediaflow
The integration with Umbraco can be used as soon as it is installed. However, for the files to be accessible and used optimally, administrators need to have prepared the settings for them in Mediaflow first.
Install the integration for Umbraco
There are a few steps to take to ensure the plugin works correctly.
You must ensure that the web server hosting the Umbraco website does not block traffic to the mediaflow.com domain. The plugin needs to communicate with the servers to retrieve data from Mediaflow.
You must ensure that files and folders in Mediaflow that should appear in the plugin inside Umbraco have the correct permissions to allow the plugin to display the files and folders.
The integration is installed via Nuget and is available here https://www.nuget.org/packages/Mediaflow.Umbraco/. The installation will create a Mediaflow data type that can be used in views to embed images and videos from Mediaflow.
Once the package is installed, you must configure your installation with your authentication credentials, Client ID, Client Secret and Refresh token.
Client ID and Client Secret are provided separately by us when you order the plugin. If you have not received these, please contact Mediaflow support.
Refresh token (ServerKey) can be found in your Mediaflow account under:
Settings > Integrations > Umbraco.
In Umbraco: Click on Settings, then Mediaflow.
2. Paste the Client ID, Client Secret and Refresh token into the fields with the same names. Be careful to place the correct credentials in the correct fields, otherwise the integration will not work.
3. If you wish, you can specify a folder where files inserted from Mediaflow should be saved. If you do not select any folder here, a folder named Mediaflow will be created automatically.
You can also choose whether it should be mandatory to write an alt text for the images you insert in Umbraco. Our recommendation is that it should be mandatory.
Settings via appsettings.json
It is possible to save and use authentication credentials in appsettings.json – which is perfect for teams and different environments.
If appsettings is not used, everything works as before via the interface in Umbraco.
"Mediaflow": {
"ClientId": "[enter your ClientID you have received from Mediaflow]",
"ClientSecret": "[enter your ClientSecret you have received from Mediaflow]",
"RefreshToken": "[enter your RefreshToken you can copy from your Settingspage in Mediaflow]",
"ParentFolder": "[Id of the media folder (Guid)]",
"SetAltText": false (false is default)
},
Please note!When authentication credentials are set via appsettings, they cannot be changed via the interface.
Using the data type
To use the Mediaflow file picker, you need to add it to your document type in Umbraco.
Go to your document type in Settings and click on Add property where you select the type "Mediaflow". Mediaflow should then be ready to use on that page. Finish by clicking Save.
Information about the propertyOnce the property is created, an object of the type MediaflowMedia is generated, where it is possible to access all the properties.