Expand my Community achievements bar.

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

2 Replies

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

Avatar

Level 1

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.