Developer forum

Forum » PIM » Store assets on CDN

Store assets on CDN

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a project where I need to configure PIM as a centerpiece for multiple Ecommerce solutions. This means that PIM will server specifications and assets (Images and documents) to multiple locations.

for a lot of reasons, I feel the need to store those assets in a centralized CDN and only send information about links to the other channels.

Has this been done before? Is there any guide on how to accomplish it? Is it even supported?

Thank you,


Adrian


Replies

 
Nicolai Pedersen
Reply

It should be fairly simple to do depending on your approach.

Many CDNs will work 'automatically' simply by setting up the CDN and prefixing your image urls with the hostname of your CDN.

so www.dynamicweb.com/image.jpg becomes abc123.fancycdn.io/image.jpg and the CDN will automatically make a copy of the original and serve it from its CDN instead. It will also work for abc123.fancycdn.io/admin/public/getimage.asxh?file=image.jpg

So based on that you need to change your templates that feeds data or your integration jobs to take that into account.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you for the details.

This works very well when the resources are served on the web.
What if the documentation in PIM does not involve any rendering in front-end.

The admins will only upload some documents and images on the current file system, in PIM. And they want to share the information with another e-commerce solution. The assets are not yet on the CDN (unless there is a server-side sync), right?

Can they upload assets directly to a CDN?

Thank you,


Adrian

 
Nicolai Pedersen
Reply

No sync is needed. No need to upload to CDN.

The first time an 3rd party ecommerce accesses the abc123.fancycdn.io/admin/public/getimage.asxh?file=image.jpg it will be transferred to the CDN. It is really really reallly simple. 

As an example, I just created a random account on a Random CDN for serving assets of dynamicweb.dk:

http://cdn80574888.blazingcdn.net/

So instead of https://www.dynamicweb.dk/Files/Images/DWLogoColor_sm.svg

It becomes

http://cdn80574888.blazingcdn.net/Files/Images/DWLogoColor_sm.svg

In a simple setup:

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you. This is fantastic!

Adrian

 

You must be logged in to post in the forum