我找的SharePoint託管的應用解決方案這將提供品牌文件(JS/CSS /圖片)爲的SharePoint Online/Office 365的環境。如何在SharePoint Online/Office 365中使用SharePoint託管應用程序設置品牌文件?
我有一個很好的文章,以實現這一目標,並試圖實現相同如下圖所示鏈接:http://www.sharepointnutsandbolts.com/2013/05/sp2013-host-web-apps-provisioning-files.html
這個解決方案不是爲我工作,並同時應用程序的執行,我得到以下錯誤: Failed to provision file into host web. Error: Unexpected response data from server.
這裏是它給我的錯誤代碼:
// utility method for uploading files to host web..
uploadFileToHostWebViaCSOM = function (serverRelativeUrl, filename, contents) {
var createInfo = new SP.FileCreationInformation();
createInfo.set_content(new SP.Base64EncodedByteArray());
for (var i = 0; i < contents.length; i++) {
createInfo.get_content().append(contents.charCodeAt(i));
}
createInfo.set_overwrite(true);
createInfo.set_url(filename);
var files = hostWebContext.get_web().getFolderByServerRelativeUrl(serverRelativeUrl).get_files();
hostWebContext.load(files);
files.add(createInfo);
hostWebContext.executeQueryAsync(onProvisionFileSuccess, onProvisionFileFail);
}
請建議我,什麼都可以在這個代碼的問題?或者,建議我以另一種方式/參考創建SharePoint託管的應用程序以配置品牌文件。
在此先感謝!
有一些像內部異常的詳細信息是提供什麼實際的金錢意想不到的反應更多的細節? –
@Ola:我試圖獲取堆棧跟蹤,但它給了我空值。我只使用'args.get_message()'獲得相同的消息。其餘參數爲空,除了'get_message(),args.get_errorTraceCorrelationId()' –
你是否已經預備了一個.txt擴展名? –