introduction
Sherpa currently support uploading files to one or more document libraries. Sherpa should also learn to support uploading files with content types.
Suggested solution
The suggested solution is as follows
Currently we use the following syntax to define folders which should be uploaded to certain document libraries.
"ContentFolders": [
{
"FolderName": "SiteAssets",
"ListName": "Site Assets",
"FolderUrl": "sherpa"
}
]
This solution can be extended to include a manifest file which defines an array with files that has any additional metadata on them (any file not mentioned in the manifest is copied as-is, just a normal file like we have today)
About the manifest
We must suport the explisit properties that is on a File element
https://msdn.microsoft.com/en-us/library/office/ms459213.aspx
I.e.
DocumentTemplateForList = string
DoGUIDFixUp = "TRUE" | "FALSE"
IgnoreIfAlreadyExists = "TRUE" | "FALSE"
Level = Draft
Name = string
NavBarHome = "TRUE" | "FALSE"
Path = string ReplaceContent = "TRUE" | "FALSE"
Type = "Ghostable" | "GhostableInLibrary"
Url = string
As well as the child elements
AllUsersWebPart
Property
Of these, the "Property" element could be replaced with a key-value list. This would be important for provisioning Publishing Page Layouts, display templates etc.
Web part provisioning is something we would also have to support at one point. We should probably have a setting which indicates "replace web part on page", "ignore if web part is on page" or "appen web part to page"
About Display Templates
Display templates are a special breed of files in SharePoint. We would like to have a solution where you can deploy only the .html files and have the .js files created automatically. With csom uploads of files this may actually happen without us having to do anything, but if this is not the case, we may need a "touch after upload" property which indicates that the file will be checked out, in and published again.