1

I have a problem identifying the root folder documentLibrary after creating a new site. I'm using a POST command to create a new site (to service/modules/create-site) and everything looks fine, the site is there. However, listing the folders show that there is no defaultLibrary. I need its ID in order to create new folders on the site visible on the web pages of Alfresco share.

My impression is that the documentLibrary is only created when you access for the first time the site on the web. Any ideas?

Thanks

EDIT: the correct name is documentLibrary

Horia Toma
  • 1,099
  • 2
  • 17
  • 29

2 Answers2

2

You are correct. The documentLibrary is created on the first access. You can use the siteService.getContainer method in the javascript services API. It will create the container if it does not exist: http://wiki.alfresco.com/wiki/4.0_JavaScript_Services_API#Get_container_folder_for_component_id

I think the correct naming of the componentId is documentLibrary.

billerby
  • 1,977
  • 12
  • 22
  • I'm not using JavaScript services. I guess I have to create the folder by hand – Horia Toma Aug 27 '13 at 09:14
  • 2
    just call the HTTP service GET site/site_id/documentLibrary to create the doclib – alfrescian Aug 28 '13 at 10:09
  • 1
    Yup, the documentLibrary folder is created lazily when a user hits the page for the first time but as @alfrescian says you can fake this yourself with an extra GET request. – Will Abson Sep 02 '13 at 08:32
0

I had the same problem. I solved it by creating a folder for the template i use in Data Dictionary/Space Templates Then the documentlibrary is created.

Dairidi
  • 11
  • 4