Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Storing Json File in dam inside folder

Avatar

Level 7

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

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

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