Expand my Community achievements bar.

SOLVED

Adobe Aem Cloud - Load image/pdf

Avatar

Level 4

Good morning,

 

In Adobe Aem Cloud is it possible to load image/pdf type content into the asset module with a post type rest call ?

 

Thank you.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@robertol6836527  If you just want to load asset to Cloud, create a local user in cloud with appropriate permissions and try using below curl command 

 

curl -X POST \
-u "username:password" \
-H "Content-Type:multipart/form-data" \
-F "file=@path/to/your/image.jpg" \
-F "fileName=image.jpg" \
http://your-aem-instance.com/content/dam/folder/uploadendpoint

 

To upload an image or PDF, you typically use the multipart/form-data content type for the POST request, and you include the binary data of the file in the request body.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@robertol6836527  If you just want to load asset to Cloud, create a local user in cloud with appropriate permissions and try using below curl command 

 

curl -X POST \
-u "username:password" \
-H "Content-Type:multipart/form-data" \
-F "file=@path/to/your/image.jpg" \
-F "fileName=image.jpg" \
http://your-aem-instance.com/content/dam/folder/uploadendpoint

 

To upload an image or PDF, you typically use the multipart/form-data content type for the POST request, and you include the binary data of the file in the request body.