使用 WCF REST 将块上传到 Windows Azure Blob
我同时使用 Windows Azure Blob 存储和 WCF REST 服务来上传带块的大文件。
我可以轻松上传一部分文件,但我必须找到一种方法来将这些块合并到 Azure Blob 中。执行此操作的最佳做法是什么?
这是我的界面:
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate="Upload?name={name}&chunk={chunk}&chunks={chunks}")]
int Upload(string name, string chunk, string chunks, Stream fileContents);
I'm using Windows Azure Blob Storage and WCF REST Services together to upload large files with chunk.
I can upload one part files easily, but I have to find a method to merge this chunks in an Azure Blob. What is the best practise to do this?
This is my interface:
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate="Upload?name={name}&chunk={chunk}&chunks={chunks}")]
int Upload(string name, string chunk, string chunks, Stream fileContents);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
BlockBlob 解决了我的问题。我可以轻松上传 256kb 块的大文件。这是对我有帮助的示例:
http://code.msdn.microsoft.com/windowsazure/Silverlight-Azure -Blob-3b773e26
BlockBlob solved my problem. I can upload huge files as 256kb chunks easily. Here is the example which helped me:
http://code.msdn.microsoft.com/windowsazure/Silverlight-Azure-Blob-3b773e26
我无法谈论如何与 WCF 交互,但如果您需要提高上传性能,您应该考虑使用块访问模式并运行多个线程。
http://rob.gillenfamily.net/2010/09/13/maximizing-throughput-in-windows-azure-e28093-part-1/#fbid=51un4MimSGt
埃里克
I can't speak of how to interact with WCF, but if you need to improve your upload performance, you should look at using the block access pattern and running multiple threads.
http://rob.gillenfamily.net/2010/09/13/maximizing-throughput-in-windows-azure-e28093-part-1/#fbid=51un4MimSGt
Erick