Programmatically uploading binary files into AEM CS from external integrations
We often come across use-cases where one needs to programmatically create assets in DAM while working with AEM Assets. A typical scenario is when external systems that are integrating with AEM, need to upload/create a file to DAM. We recently tackled a similar scenario and are excited to share the design we implemented.
Creating assets in AEM CS programmatically
Most of the Java based APIs for directly creating assets are marked as deprecated [1] in AEM CS. Therefore, it is no longer recommended to upload binaries using these APIs.
The recommended way to upload binary to AEM CS is to upload them directly to cloud storage using HTTP API and the steps required for uploading are to be executed in an external application (not via AEM JVM). This is a 3-step process [2] to successfully upload any binary file into AEM. The good news is that you don’t have to write code from scratch to execute this 3-step process, Adobe is providing open-source libraries [3] and tools to make this easier to implement.
Utilizing aem-upload module alongside Adobe application builder. We utilized the aem-upload Node.js module in App Builder to facilitate asset creation from external application to AEM CS. Below is a very high level architecture diagram of how this integration that was set up, simplified for clarity.
To use aem-upload, you can create an application in Adobe app builder and include aem-upload as a module.
Recommended by LinkedIn
Using aem-upload and Adobe app builder you can simplify your implementation to upload binary files into AEM cloud service.
Reference:
#cfbr
Useful
This is indeed a quick go to article which can be handy for any project implementation. Keep sharing 😉
Why we need app builder for this ,can’t we directly put post call to assetAPI