Nov 15 2016 03:07 PM - edited Nov 15 2016 03:15 PM
Hi, I have installed the PnP Partner Pack V2 and all are working as expected. In the PnPProvisioningTemplates library, i have uploaded a xml file and created new folder having css, images, fonts, js, PageLayouts and ThemeGallaery. I can select my new template in the Azure web app (http://webappdev.azurewebsites.net/Home/CreateSiteCollection). During the site creation it is able to apply the template (having web settings, regional seetings, security, features, custom actions) except files (throwing an error: "Value cannot be null. Parameter name: stream"). File details in the XML as below:
<pnp:File src=".\Style Library\Images\banner.png" Folder="{site}/Style Library/Images" Overwrite="true">
</pnp:File>
Soruce location : https://tenant.sharepoint.com/sites/sitename/PnPProvisioningTemplates/CustomTemplate/Style%20Library...
Target location:
{site}/Style Library/Images
Can someone suggest me, how to pass the source file Url, so that files can be picked up and uploaded into the target location using the XML template.
Nov 15 2016 10:37 PM - edited Nov 15 2016 10:46 PM
Are you using Powershell to do this or csom? and if i remember you need to specify the whole path if you use azure.
and do you have a connector on the filessystem depending on where you put your files you have to apply the correct path says my colleague @Robert Schouten
Nov 16 2016 03:36 PM
Hi Paul,
Thanks for the reply!
I have fixed the issue as below. My learnings are below:
1. If i am reading the files from directory (local folder), my file srouce path is
<pnp:File src=".\CustomFolder\css\filename.css" Folder="{site}/Style Library/css" Overwrite="true">
</pnp:File>
2. If i am reading the files from different site collection, my file path is
<pnp:File src="/CustomFolder/filename.css" Folder="{site}/Style Library/css" Overwrite="true">
</pnp:File>
Oct 28 2018 01:10 PM
Hi, Quick question on the second point.
2. If i am reading the files from different site collection, my file path is
<pnp:File src="/CustomFolder/filename.css" Folder="{site}/Style Library/css" Overwrite="true">
How you specify the src path here? I mean how it knows, which site collection to read? I have the css in another site collection library and want to copy from there to destination site.
Any hints?
Thanks!
Ravi
Jan 05 2021 01:08 AM
@Ravi Chandra, did you get it working? as I am also facing the same issue but still no lead could you help me if any suggetion.