SharePoint 2010 Silverlight Web 部件 - 将多个文件从 Web 下载到文档库
需要使用 Silverlight 4.0 Web 部件将多个文件从 Web 位置下载到 SharePoint 2010 文档库。
是否可以实现这一点,而无需将文件下载到本地计算机,然后将其上传回SP服务器?这将如何完成?
Silverligth 可以在沙箱中运行时打开流吗?拥有具有提升权限的浏览器外应用程序并不是一种选择。
如果不是,是否必须使用隔离存储,因为我们有多个文件需要下载并重新上传到文档库?还有其他选择吗?文件有几 MB 大,因此必须增加隔离存储大小。
谢谢
There is a need to download multiple files from a web location to the SharePoint 2010 document library using a Silverlight 4.0 web part.
Is it possible to achieve this without downloading files to the local computer and then uploading them back to the SP server? How would this be done?
Can Silverligth open a stream as it's running in the sandbox? Having an out of the browser application with elevated privileges is not an option.
If not, must isolated storage be used as we have multiple files to be downloaded and re-uploaded to the document library? Is there another option? Files are a few MBs large, so the isolated storage size would have to be increased.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您可以将文件上传到 SharePoint,而无需临时将其保存到光盘。有人有一个类似的问题,唯一的区别是他从磁盘读取字节数组。要从不同的网址下载/流式传输内容,我建议您使用 WebClient 类(也支持异步下载)。我认为你不需要调整隔离存储。
刚刚在 Google 上找到了另一篇另一篇文章 ,您可能想将该代码更改为您喜欢的。
请注意,SharePoint 有一个(默认)最大值。上传大小为 50mb(iis7 有 30mb) - 您可以在 web.config 中更改此设置,但需要应用于所有服务器)。
Yes, you can upload files to SharePoint without temporary saving it to disc. Somebody had a similar question, the only difference is that he reads the byte array from disk. To download/stream the content from a different web address, i'd suggest you use the WebClient class (which also supports async downloading). I don't think you need to adjust the isolated storage.
Just found another another article on google, you might want to change that code to your like.
Note that SharePoint has a (default) max. upload size of 50mb (iis7 has 30mb) - you can change this in the web.config, but it needs to be applied to all servers).