Asset file split/chunk send over REST API - DAM



Hello Everybody, 


We have a requirement to push assets from AEM DAM to external DAM (non AEM-DAM) using rest API.
It is easy to push small size assets (up to 20 MB), but issue is with larger size assets due to Rest API data transfer limit.
One option is to split the large files in chunks and send each chunk over Rest api call.

but in case of bulk asset push what should be right approach to handle these assets chunks 


1. InputStream
2. File system (temp file)
3. or any other recommandation (please)

In case of inputStream, lets say for one assets (size = 50 mb), we have created 3 chunks, chunk push on Rest API should be sequential or parallel.
Sequential processing of chunks will take more time, whereas parallel processing will take less time, but  multi threading is having its own overhead. 


can you please suggest recommended way to handle this kind of use case.





Accepted Solutions (1)

Accepted Solutions (1)




It totally depends on the remote system, what is the best way to make it work. Technically you can write code, which reads the data from the binary asset object, and sends it chunks of 20MB to the remote system. You just need to know if (and how) the remote system can handle that a new asset is sent in chunks.


Another way would be a transfer file share, where your custom code in AEM will export the files into and from where the remote system is reading the data then.


It's hard to recommend a specific approach without knowing the details of the affected products and all the circumstances and requirements around it.

Answers (1)

Answers (1)