Skip to main content
Level 6
December 29, 2021
Solved

Storing Json File in dam inside folder

I have Json data object coming in servlet along with path("/content/dam/temp").

 

I need to store the json data by creating a json file in path("/content/dam/temp"). How can we achieve that?

 

And If this path is not present we need to create this path with temp as nt:folder

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
milind_bachani
milind_bachaniAccepted solution
Adobe Employee
December 31, 2021

Hi @ronnie09 

I think this piece of code might help you to achieve what you are looking for.
You can make use of com.day.cq.dam.api.AssetManager api to deal with creation/deletion of the assets.

Thanks

2 replies

milind_bachani
Adobe Employee
milind_bachaniAdobe EmployeeAccepted solution
Adobe Employee
December 31, 2021

Hi @ronnie09 

I think this piece of code might help you to achieve what you are looking for.
You can make use of com.day.cq.dam.api.AssetManager api to deal with creation/deletion of the assets.

Thanks

Translate
New Member
November 12, 2024

Many of the methods encapsulated in AssetManager are now deprecated, we are now required to handle this in a different manner. I am still struggling with this one but will post solution here once I discover one.

Translate