Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Storing Json File in dam inside folder

Avatar

Level 5

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
Community 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
Community 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