在Windows Azure中存储大型视频文件 [英] Storing large video file in Windows Azure

查看:119
本文介绍了在Windows Azure中存储大型视频文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将大型视频文件(> 300MB)上传到Windows azure。通过使用普通的fileUpload,它有时会抛出超时错误。所以我想在telerik函数中使用AsyncUpload。



我能达到的解决方案是将文件保存在临时文件夹中,然后使用该文件上传到Azure。



但我想知道是否可以将AsyncUpload中的流直接保存到AzureBlob。



感谢和问候,

Mohan Prasath

I am uploading a large video file(>300MB) to the Windows azure. By using the normal fileUpload it is at times throwing time out error. So I thought of using AsyncUpload in telerik function.

The solution I can attain is by saving the file in temporary folder and then use the file in uploading to Azure.

But I wanted to know whether I could save the streams from the AsyncUpload to directly to the AzureBlob.

Thanks & Regards,
Mohan Prasath

推荐答案

基于任务异步模式





基于任务的异步模式是实现异步操作的首选方式,因为它是最简单,最直接的。要使用此方法,只需实现服务操作并指定任务'<'T'>'的返回类型,其中T是逻辑操作返回的类型。例如在C#中:



Task-Based Asynchronous Pattern


The task-based asynchronous pattern is the preferred way to implement asynchronous operations because it is the easiest and most straight forward. To use this method simply implement your service operation and specify a return type of Task'<'T'>', where T is the type returned by the logical operation. For example in C#:

public class SampleService:ISampleService 
{ 
   // ...
   public async Task<string> SampleMethodTaskAsync(string msg) 
   { 
      return Task<string>.Factory.StartNew(() => 
      { 
         return msg; 
      }); 
   }
   // ...
}





SampleMethodTaskAsync操作返回Task'<'string'>',因为逻辑操作返回一个字符串。有关基于任务的异步模式的更多信息,请参阅基于任务的异步模式。



在我的情况下,我不熟悉telerik功能中的AsyncUpload但我确定它在某些时候会出现带宽问题。



The SampleMethodTaskAsync operation returns Task '<'string'>' because the logical operation returns a string. For more information about the task-based asynchronous pattern, see The Task-Based Asynchronous Pattern.

In my case I am unfamiliar with "AsyncUpload in telerik function" but I'm sure it will be a bandwidth issue at some point.


还有一个名为RadCloudUpload的控件,它具有与你相同的功能,你可以试试



http://www.telerik.com/help/ aspnet-ajax / cloud-upload-overview.html [ ^ ]
There is one more control called RadCloudUpload which has the same functionality as yours you can try that

http://www.telerik.com/help/aspnet-ajax/cloud-upload-overview.html[^]


这篇关于在Windows Azure中存储大型视频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆