Since we are using AEM as a cloud service, I've been told not to use the AssetManager to programmatically upload images. I've implemented the .initiateUpload.json call but I am seeing a "No Host" exception when I make the initial call to start the upload. Using the URL in a browser returns that the servlet could not be found.
Is there something I need to configure in my local instance to enable uploading images so that I can make sure my code will work when we deploy it?
Solved! Go to Solution.
Views
Replies
Total Likes
@Robert-Harper - No host exception can occur if the AEM Author Cloud Environment URL is incorrect. Since uploading an asset is a three step process - initiate upload, upload binary files, complete the upload. All these APIs need to be called with correct authentication header/token [1] . For more details on asset upload APIs, there are also a few open source libraries which you can implement in your project code based on preferred programming language [2] or you can even create one as shown here [3]
Hope this helps!
Jineet
@Robert-Harper - No host exception can occur if the AEM Author Cloud Environment URL is incorrect. Since uploading an asset is a three step process - initiate upload, upload binary files, complete the upload. All these APIs need to be called with correct authentication header/token [1] . For more details on asset upload APIs, there are also a few open source libraries which you can implement in your project code based on preferred programming language [2] or you can even create one as shown here [3]
Hope this helps!
Jineet