首页 > 解决方案 > 将超过 4 GB 的文件上传到 .net Core 5 API

问题描述

我尝试过的:

<system.webServer>
< security >
  < requestFiltering >
    < requestLimits maxAllowedContentLength="4294967295" / >
  </ requestFiltering >
</ security>

</system.webServer>

services.Configure<FormOptions>(o =>
        {o.ValueLengthLimit = int.MaxValue;
            o.MultipartBodyLengthLimit = 4294967295;
            o.MemoryBufferThreshold = int.MaxValue;
        });
        services.Configure<IISServerOptions>(options => {
            options.MaxRequestBodySize = 4294967295;
        });

但它限制为 4 gb .. 但我的客户想通过这个 Rest API 传输 16 gb 的文件。我不信。可能吗 ?

标签: c#.net.net-5rest

解决方案


推荐阅读