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
BedrockMission!

Learn More

View all

Sign in to view all badges

How to create folder from url

Avatar

Avatar
Validate 10
Level 3
chung_yonge1684
Level 3

Likes

16 likes

Total Posts

91 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
chung_yonge1684
Level 3

Likes

16 likes

Total Posts

91 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
chung_yonge1684
Level 3

02-11-2018

Hello Everyone,

I have a question.

When I publish after I select file(ex:BeSafeOutThereOnStarCanada_p240.mp4) on asset page like the below picture,

(This url is http://localhost-aem-dispatcher:4502/assets.html/content/dam/rcc-solution-poc/rcc-video)1612552_pastedImage_1.png

the file(ex:BeSafeOutThereOnStarCanada_p240.mp4) for dispatcher cache has been created successfully like the below picture.

1612562_pastedImage_4.png

But when I publish after I select folder(ex:rcc-video) on asset page like the below picture,

(This url is http://localhost-aem-dispatcher:4502/assets.html/content/dam/rcc-solution-poc)

1612563_pastedImage_5.pngthe folder(ex:rcc-video) for dispatcher cache does not create like the below picture.

1612564_pastedImage_6.png

I have implemented to create file and folder with HttpClient package when I publish on asset page.

The file caching works well.

But the folder caching does not work.

Also I tried it with curl command when I publish on asset page.

But file caching and folder caching did not work.

I have to implement to create folder only when I publish after I select the folder only on asset page.

Can you recommend me how to create folder(ex:rcc-video) from url(http://localhost-aem-dispatcher:4502/assets.html/content/dam/rcc-solution-poc/rcc-video) regardless of operating system (ex:windows, unix, max os) ?

Regards

Chung Yong.

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

02-11-2018

I am not clear at all on your use case - looks like you want to publish an asset from one AEM instance to another.

Also - if you need to perform some additional tasks when publishing an Asset/Page in AEM - i recommend that you look at using a workflow and purhaps the use of custom workflow step.

Avatar

Avatar
Boost 1
Employee
amitgupta_adbe
Employee

Likes

2 likes

Total Posts

26 posts

Correct Reply

8 solutions
Top badges earned
Boost 1
Affirm 5
Affirm 3
Affirm 1
View profile

Avatar
Boost 1
Employee
amitgupta_adbe
Employee

Likes

2 likes

Total Posts

26 posts

Correct Reply

8 solutions
Top badges earned
Boost 1
Affirm 5
Affirm 3
Affirm 1
View profile
amitgupta_adbe
Employee

02-11-2018

a file is created in dispatcher cache because dispatcher is trying to cache the file, when you try to publish it or go to details page. Browser must be sending a get request for the file and dispatcher must be caching it.

In case of folder, there is no such file requested. dispatcher will not cache any thing.

Why do you want to rely on folder or file being created in dispatcher cache

Avatar

Avatar
Validate 10
Level 3
chung_yonge1684
Level 3

Likes

16 likes

Total Posts

91 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
chung_yonge1684
Level 3

Likes

16 likes

Total Posts

91 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
chung_yonge1684
Level 3

03-11-2018

This page is Asset Page.

1613597_pastedImage_0.png

This tree is /content/dam for Asset in CRXDE Lite.

1613598_pastedImage_1.png

When I unpublished parent folder(ex:parent) in Asset Page, all children folders(ex:child1, child2,) and all children files(ex:file01.doc, file02.txt, file03.pptx,file04.xlsx) unpublished automatically.

But when I published parent folder(ex:parent) in Asset Page, all children folders(ex:child1, child2,) and all children files(ex:file01.doc, file02.txt, file03.pptx,file04.xlsx) did not publish automatically.

Parent folder(ex:parent) published only.

I can not understand why.

So, Because of that,  child has activated  child only In  line 187 of my source code like below that.

1613599_pastedImage_3.png

In addition, In my source code,  I want to  implement  the method that activate all child folders and files  when parent folder activates in asset page.

How can I implement  it ?

Regards

Chung Yong.

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,356 likes

Total Posts

3,227 posts

Correct Reply

917 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,356 likes

Total Posts

3,227 posts

Correct Reply

917 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

04-11-2018

To Activate child page automatically on activation of parents, you can write sling event listener which listen this nodes replication event and as soon as parent publish, children pages will also be published.