Getting started
This guide will help you get started with using DAM. By the end of the guide, you will have uploaded a file, transformed it, and retrieved a cacheable URL from the API.
The guide can be followed with associated code examples from our GitHub repository, which you will find here.
Setup environment
The first thing to do is set up a local Bizzkit development environment. A detailed guide for doing this can be found here.
Note
DAM has some limitations when running in a local Docker environment which can be found here.
Uploading a file
Upload some product images to the root folder by pressing the 'UPLOAD' button. In this guide, we will upload a single image file.
Note down the file ID after uploading, which you can see on the right side after selecting your file. Example below:
Retrieving a file
Let's use the API to retrieve a URL for the image we uploaded, and at the same time do some ad-hoc transformation:
For the full code example, click here.
- Go to
https://localhost:8012/swagger/index.html
or where you might access the DAM API. - Authorize
-
Go to
POST: /api/{culture}/files/cache/details
and send a request with the following body:
Note
Your fileId
will be different from the one in the request above.
You should get a fileUri
which can be used to retrieve the file, alongside some meta information for the transformed file.
Important
In a real production environment you would rely on precached transformations, instead of the ad-hoc transformation we did here, to speed up response times. For more related to predefined settings, click here.
In addition, do not cache the fileUri
for a long period since it can change.
Next steps
This guide introduced you to the key functionality of DAM, which is uploading files, transforming them, and generating URLs. However, DAM has a lot more to offer than just that, so we recommend you check out our tutorials, how to's, concepts and user guide to gain even more knowledge about Bizzkit DAM.