Store Asset binary data outside AEM, and still reference it from within AEM | Community
Skip to main content
Level 9
October 16, 2015
Solved

Store Asset binary data outside AEM, and still reference it from within AEM

  • October 16, 2015
  • 11 replies
  • 4746 views

Hello,

Is there a way one could have the binary data of an asset stored elsewhere(outside of AEM, say CDN) and have a reference say a url , stored in metadata property in AEM,  pointing to where the asset is stored in CDN. The asset in CDN has the binary data.

Thus the asset in AEM has the refernce to the asset and its binary data in CDN. Is it possible to go about this approach?

Please suggest.

Regards,
NZ

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by PaulMcMahon

Ah I misunderstood your use case. There is no way use the DAM and store the binary somewhere else. Realistically you have 3 options in my opinion:

  1. Follow AEM standard and store and serve the binary from AEM. 
  2. Store the binary somewhere else and in the image components that render image on pages you store a reference to the binary in that other system and your image components point to that URL at run time. 
  3. Store the binary in AEM DAM and in the other system. One of the pieces of meta-data you store in AEM is a pointer to the binary in the other system. Then at runtime your image components use that point rather than the AEM URL. Depending on your process for creating these images you create a custom workflow that would publish and image to the other system. This is similar to how the Scene 7 integration works - http://dev.day.com/docs/en/cq/current/administering/integrating_with_adobe_marketing_cloud/scene7.html

11 replies

Level 9
October 16, 2015

orotas wrote...

AEM stores binaries in the data store using an MD5 hash of the file as the file name - the directory structure is not predictable however. The path to the item in the data store is not exposed outside of the persistence manager so there is no realistic way to leverage the data store. 

What exactly are you trying to achieve - is this an existing asset store you are attempting to leverage, or are you concerned about publishing/performance? 

 

yes, I am concerned about performance, i would have assets stored at some location in another environment, I would get it into AEM(by uploading), generate renditions, metadata and then delete the binary data , and have it referenced to an external url where the binary data is stored.

I came to a point where i could upload the asset and generate metadata and renditions along with setting a url property to reference the asset from a remote location, but when i wanted to delete the jcr:data, it threw an error that was a mandatory property and cannot be null, so i was wondering if i could get an approach just the way aem stores binary data elsewhere but references in AEM.