In AEM as a Cloud Service, image processing has been moved to the Asset Compute Microservice. Binary files are uploaded directly to blob storage instead of streaming through the AEM JVM.
In this post, I explain how to get started with the asset upload HTTP API. I review and demonstrate the below-illustrated steps ( 1, 2, and 3) using Postman as a client application.
Note: The Asset Upload HTTP API only works on Cloud Service, not for local SDK
Note: Adobe provides the AEM Upload tool to make uploading easier, and can be used as a command-line executable or required as a Node.js module.
Note: Before you begin, create a user in AEM with sufficient permission to upload assets and create a folder within the asset dam to upload to. For the sake of demo and simplicity, I am using the basic authentication but Service Token base authentication is the preferred method.
1. Make a request for upload to AEM
The first step in the sequence is to make a request to AEM, relaying the intent to upload files. This requires authenticating with AEM and providing details about the assets you intend to upload (e.g. file name, file size).
The URI format for this POST call is:
Add Basic Auth Credentials
Do we need to enable Assets HTTP API in AEM cloud service to make these calls. If yes, what are the steps to be followed to enable Assets HTTP API.
When i tried as in the blog, getting response as
Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource.
Note:The credentials that i used in basic auth having enough permisisons to access the AEM cloud author instance.