mini-cdn
Web icon

Mini CDN

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 26 October 2023
 by 
5.0
 (1 rating)
mini-cdn

Mini CDN

Documentation
1.0.0

Put your user-uploaded static files (images, documents, ...) into MiniCDN and serve them way more efficiently than normal. Serving resources from MiniCDN will take advantage of browser caching.

This means that the resource will not be downloaded again if the browser already has a copy, unless the resources has since changed.

Add resources (images, documents, ...) by calling MiniCDN_CreateOrUpdateResource.  

This will return a ResourceId. Save this ResourceId on the entity where you would normally save the BinaryData of uploaded content. Instead, the BinaryData is now in MiniCDN and you get a ResourceId pointing to it.

To update the Resource content, use MiniCDN_CreateOrUpdateResource with your existing ResourceId.

Use MiniCDN_GetURL to get the URL to your Resource. You can use this URL to get to your resource content (with caching).

You can also build your URL yourself (client-side) as follows:

https://<your-outsystems-domain>/MiniCDN/Resource.aspx?ResourceId={ResourceId}


Overview of the available server actions:

  • MiniCDN_CreateOrUpdateResource
    Used to add content to the CDN.
    Use an empty ResourceId for new resources. Using an existing ResourceId will update the resource in the CDN.
  • MiniCDN_DeleteResource
    Deletes a Resource in the CDN.
  • MiniCDN_GetUrl
    Get a URL to fetch the Resource with the given ID.
    The Resource (for example an image or pdf) will be served on that URL using Cache-Control headers and ETag headers.
  • MiniCDN_Export
    Action to export Resources with the given ID's. Can be imported later using MiniCDN_Import.
  • MiniCDN_Import
    Action to import Resources exported using MiniCDN_Export.