Kentico Synchronizing particular folder inside the CMS

Ei Dar Li Ko Ko asked on February 2, 2016 10:44

I am currently using the staging to sync the contents from staging to production first. I have created a web part which deploy a created folder inside the CMS to gather the images. When these images are uploaded to the staging, I want it to sync to the production automatically. Any way to achieve this? Thanks.

Recent Answers


David te Kloese answered on February 2, 2016 11:25

Hi,

So what would trigger this 'automatic' sync? How does the system know you or the editor is done with uploading 1 or n+1 images? Is this one action?

You can read general info about automatic staging here: https://docs.kentico.com/display/K8/Automatic+content+synchronization

Greets,

David

0 votesVote for this answer Mark as a Correct answer

Ei Dar Li Ko Ko answered on February 2, 2016 12:07

The images are shown in the slider after upload. For the sync, it is trigger with the scheduled task.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on February 2, 2016 12:28

Hi,

So you want to trigger synchronization after a scheduled task has run? Is this a custom scheduled task?

Greets,

David

0 votesVote for this answer Mark as a Correct answer

Ei Dar Li Ko Ko answered on February 2, 2016 12:36

Content synchronization scheduled task is running currently. I have set up the staging server. This is the kentico included one. Not custom. But it does not include copying files or codes inside the CMS. What I want to know is.. can i write any manual sync or scheduled task so that this image file will include in the sync process. Thanks

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on February 2, 2016 12:40

Hi,

As the link mentioned earlier notes: The scheduled task only synchronizes page changes. You cannot use the default Content synchronization task to synchronize changes of custom table data or objects.

You could build something custom as mentioned here:

https://docs.kentico.com/display/K9/Automatically+synchronizing+staging+and+integration+tasks

Greets,

David

0 votesVote for this answer Mark as a Correct answer

Ei Dar Li Ko Ko answered on February 2, 2016 12:44

But will this able to work on the folders and files inside the kentico CMS root folder?

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on February 2, 2016 13:30

Hi,

If they have a representation object in Kentico (file / media library item) yes. Otherwise you might want to look at the Intergration Bus.

https://docs.kentico.com/display/K9/Using+the+integration+bus

Groet,

David

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on February 2, 2016 15:08

You can stage files in the media library (which is inside the CMS directory). This is simply a checkbox in the settings which is unchecked by default. What I'd do is have part of the configuration of your webpart to define a media library to upload your files to. Then use the media library API to create your files and content staging will automatically pick up the newly added files and stage them.

0 votesVote for this answer Mark as a Correct answer

Ei Dar Li Ko Ko answered on February 2, 2016 15:12 (last edited on February 2, 2016 15:12)

Hi.. Brenden..did you use webfarm synchronization or staging? Need to develop custom sync?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on February 3, 2016 00:11

Staging. For web farm, it will sync as well if I remember right.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.