使用 WCF REST 将块上传到 Windows Azure Blob

发布于 2024-12-28 22:15:02 字数 365 浏览 6 评论 0原文

我同时使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

身边 2025-01-04 22:15:02

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

攒眉千度 2025-01-04 22:15:02

我无法谈论如何与 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文