在Azure存储中归档大文件的方法 [英] Approach for archive big files in azure storage

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

问题描述

我对在您的项目中将敏感数据存储在云中的方法感兴趣.

I'm interested in what is approach for storing of sensitive data in cloud in your projects.

我想准备必须在Azure中存档文件的功能概念证明.我们正在谈论每天大约30GB的新文件.每个文件10-2000 MB.

I want to prepare proof of concept of feature which have to archive files in Azure. We are talking about samething around 30GB of new files per day. 10-2000 MB per file.

我的第一个想法是使用Azure存储来存储那些文件. 文件应该通过Azure App Service发送到存储,因此我必须准备一些WEBApi.

My first idea was to use Azure Storage to store those files. Files should be send to storage via Azure App Service so I have to prepare some WEBApi.

基于这个想法,我很好奇将如此大的文件发送到webapi是否不会有任何问题? 任何提示,我还应该考虑什么?

Based on this idea I am curious if there wont be any problems with sending such a big files to webapi? Any tips what should I also consider?

推荐答案

ASP.NET的默认请求大小为 4MB ,因此,如果要允许上传,则需要增加该限制.和下载较大的文件.

The default request size for ASP.NET is 4MB, so you’ll need to increase that limit if you want to allow uploading and downloading of larger files.

您可以通过在web.config文件中设置maxRequestLength和maxAllowedContentLength值来做到这一点.

You can do this by setting the maxRequestLength and maxAllowedContentLength values in your web.config file.

注意:maxRequestLength值以KB为单位,但maxAllowedContentLength值以字节为单位.

Note:the maxRequestLength value is in KB, but the maxAllowedContentLength value is in bytes.

以下是将请求限制增加到2000MB的示例:

Here is an example for increasing request limits to 2000MB:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.web>
        <!-- 100 MB in kilobytes -->
        <httpRuntime maxRequestLength="204800" />
    </system.web>

    <system.webServer>
        <security>
            <requestFiltering>
                <!-- 100 MB in bytes -->
                <requestLimits maxAllowedContentLength="209715200" />
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>

您可以使用异步任务,主要是为了更好地支持处理大文件.

You could use async Task, mainly for better support of handling large files.

这是文章有关使用Web API和Azure Blob存储上传和下载大文件的信息,

Here is a article about uploading and downloading large file with Web API and Azure Blob Storage, you could refer to it.

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

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