简体   繁体   English

在asp.net中上传大文件

[英]Upload large file in asp.net

I want to upload 30GB with asp.net file upload control, i have heard that ftp can do this or some advanced uploader. 我想使用asp.net文件上传控件上传30GB,我听说ftp可以做到这一点或一些高级上传器。 I searched but did not find any suitable code or some open source plugin for asp.net. 我搜索了但没有找到任何合适的代码或asp.net的某些开源插件。 Do you know some library or whats the right way to do this, i am confused. 您是否知道一些图书馆或执行此操作的正确方法,我感到困惑。
I am in search of ASP.Net file upload which could upload large file eg 30GB, and with any logic like ftp or some other resuming way. 我正在搜索ASP.Net文件上传,该文件可以上传较大的文件(例如30GB),并带有ftp等逻辑或其他恢复方式。 So is there any plugin which can do this job? 那么,有没有插件可以做到这一点?

I don't think you can do this. 我认为您无法做到这一点。 Many browsers have upload limit ~ 2GB. 许多浏览器的上传限制为2GB。 Think about different solution than HTTP POST, eg direct FTP upload. 考虑与HTTP POST不同的解决方案,例如直接FTP上传。

Here is a pretty good writeup of the problem http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx 这是问题的一个很好的写照http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx

In my own experience working with gigabyte uploads in .net several years ago, it is not easy within the common controls and infrastructure. 根据我几年前在.net中处理千兆字节上载的经验,在通用控件和基础结构中这并不容易。 You will be fighting http timeouts, and have to adjust the web.config to allow for the file size and changes a bit in web.config. 您将要应对http超时问题,并且必须调整web.config以允许文件大小并在web.config中进行一些更改。

What has to happen to make it work is some form of chunking. 使它起作用的必须要做的是某种形式的分块。 So you divide the file up into much smaller pieces and then attempt to upload each one. 因此,您将文件分成了很多小块,然后尝试上传每个文件。 Then you will have to keep track of which pieces you have gotten and which you have not. 然后,您将必须跟踪获得的零件和没有的零件。

A better/easier solution is to add some RIA functionality to your application so you can handle the upload in 更好/更轻松的解决方案是在您的应用程序中添加一些RIA功能,以便您可以在

You could try NeatUpload http://neatupload.codeplex.com/ . 您可以尝试NeatUpload http://neatupload.codeplex.com/ I've used it last time for uploading files as large as 10MB without problems. 我上次使用它上传的文件最大为10MB,没有问题。 Never tried it with multi GB files though. 从未尝试过使用多GB文件。

The control requires full trust. 控制需要完全信任。

我认为最好的应该是WebDAV服务器引擎方法http://www.webdavsystem.com/server/documentation/large_files_iis_asp_net

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM