0
我对SharePoint相当新,我已经编写了一个应用程序,在单击某个按钮时下载文档,但是当我下载该文档时它会自动保存在bin文件夹中,我怎么能更改文档保存的位置?在SharePoint 2010中更改保存文件夹的位置
任何帮助将不胜感激!
这里是我的代码:
private void button11_Click(object sender, EventArgs e)
{
using (var site = new SPSite(SiteUrl))
{
var web = site.RootWeb;
var docLibFileUrl = "http://foo/demo/SharePointTest/Test.docx";
var localFileName = "Test.docx";
SPFile spFile = web.GetFile(docLibFileUrl);
FileStream outStream = new FileStream(localFileName, FileMode.Create);
byte[] fileData = spFile.OpenBinary();
outStream.Write(fileData, 0, fileData.Count());
outStream.Close();
}
listBox1.Items.Add("Document downloaded");
}
感谢您的支持!这正是我需要的。对不起,延迟回到你身边! –