File fetching

File fetcing is the act of retrieving a url that points to a file in DAM from an external software system. This is a two-step operation.

  1. Request the url by passing data which was previously returned by file picker
  2. Request the file itself using the url returned in step 1

Files are never fetched directly from the primary file storage. Instead they are fetched from the file cache which ensures optimal performance.

File fetching operations go through the file fetch api which handles either one of the following cached representations.

  • Original files
  • Original files combined with file croppings
  • Original files combined with predefined settings
  • Original files combined with predefined settings combined with file croppings

This allows external parties to fetch, say a product image, and at the same time specify e.g. a predefined setting that defines the canvas size of the resulting image + a watermark merge - and finally specify a cropping that isolates a particular part of the product.

Since file fetching is closely related to file picking (part of step 1), we recommend reading that section too.


Please note the importance of not saving the direct url (step 1) permanently in the external software system. Some url micro caching is fine (and probably necessary), however you should take into consideration that there is no guarantee that the url is stable between api-calls. This certainly also applies in the small interval between step 1 and 2. Step 2 can always result in a http-404-error, and the probability increases with the time interval between step 1 and 2.