Adobe DAM server extractiong the zip file and activate the assets using curl

Avatar

Avatar

Anjan

Avatar

Anjan

Anjan

16-12-2019

Hi, 

 

I have a requirement to upload the zip file, and extract it in dam server and activate the assets using curl. Currently I'm able to upload the zip file using curl, but I'm unable to extract it with curl, here I'm using bash script to upload the files but seems like most of the community using the java.

Could you guide me, is it possible to extract the zip in DAM server.

 

 

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Nirmal_Jose

MVP

Avatar

Nirmal_Jose

MVP

Nirmal_Jose
MVP

16-12-2019

Hi,

If its an AEM package itself, then you can do it two ways.

 

1. Upload, Install and replicate

a. upload & install
curl -u admin:admin -F file=@"name of zip file" -F name="samplepackage.zip" -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp

b. replicate

curl -u admin:admin -X POST  http://localhost:4502/crx/packmgr/service/.json/etc/packages/my_packages/samplepackage.zip?cmd=repli...

 

2. Upload, Install in author and publisher instances separately

Use curl of 1.a itself 

 

If your requirement is just to have assets and not as an AEM package, you need to do it asset by asset.

1. Upload an Asset(Ex: test.png)
curl -u admin:admin -X POST -F file=@"test.png" http://localhost:4502/content/dam/geometrixx/portraits.createasset.html

2. Activate the asset

curl -u admin:admin -X POST -F path="/content/dam/geometrixx/portraits/test.png" -F cmd="activate" http://localhost:4502/bin/replicate.json

 

Answers (1)

Answers (1)

Avatar

Avatar

jbrar

Employee

Avatar

jbrar

Employee

jbrar
Employee

16-12-2019

You can look into creating the CURL command when you try to extract a sample file from the assets UI. Check [1] for more details. 

 

[1] https://helpx.adobe.com/experience-manager/6-3/sites/administering/using/curl.html#BuildingacURLRead...