问题描述
我正在将大型视频文件(> 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
推荐答案
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.
这篇关于在Windows Azure中存储大型视频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!