Extracting the content from a zip file in AEM | Community
Skip to main content
ajayk51367852
Level 2
April 17, 2017
Solved

Extracting the content from a zip file in AEM

  • April 17, 2017
  • 1 reply
  • 3642 views

   Hi,

  There is a scenario where,  I drag-drop a zip file into dam, i need to unzip it and scan its contents and if it contains static html page, i need to move it under /content/(some particular folder structure), if it contains images : those should get uploaded as dam assets.

   And if it contains styling and other scripts (css & js files) they should get moved under /etc/design/(some particular folder structure).

  For example:  I have a test.zip (containing abc.html file, img folder with 5 images, style folder with 2 css and 2 js files), when i drag-drop this into dam : I want abc.html to be uploaded under /content/(some static path), images under /content/dam/(some static path) and css & js files under /etc/desing/(some static path). 

  I am planning to do this with the help of a custom workflow.

   When i browsed through few blogs, i came across few solutions saying how to extract the zipfile into a particular folder structure in a file system.

  I was just curious like how can we extract the zipfile contents and convert them into jcr:nodes of some specific node types.

Please suggest.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.