コード例 #1
0
        void CreateFile(ImportFile importFile, ClientContext context)
        {
            string serverRelativeFileUrl = string.Concat(m_serverRelativeListUrl, importFile.ServerRelativePath);

            using (var stream = importFile.OpenRead())
            {
                if (m_settings.Mode == ImportMode.Execute)
                {
                    log.Info("Saving file to SharePoint: " + ApplicationUrl + serverRelativeFileUrl);
                    File.SaveBinaryDirect(context, serverRelativeFileUrl, stream, ShouldOverwrite);
                    log.Info("Succeeded");
                }
            }
        }