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.
Solved! Go to Solution.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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.
Views
Replies
Total Likes