上传的.NET大文件 [英] Upload large files in .NET

查看:149
本文介绍了上传的.NET大文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做研究的好一点找到一个上传组件的.NET,我可以用它来上传大文件,有一个进度条,并能恢复大文件上传。我已经遇到了一些组件,如 AjaxUploader SlickUpload PowUpload ,仅举几例。每个选项都需要花钱,只有PowUpload确实可恢复上传,但它确实有它的Java小程序。我愿意为此付出代价的做这些事情做好一个组成部分,但如果我可以把它写自己,将是最好的。

我有两个问题:

  1. 是否有可能恢复一个文件上传在客户端不使用闪光灯/爪哇/ Silverlight的?
  2. 有没有人有一些code或链接到一篇文章,介绍了如何编写一个.NET的HttpHandler,使流上传和Ajax的进度条?

感谢你,
奥斯汀

我意识到我确实需要能够做到断点续传文件上传我的项目,能够这样做的任何建议组件?

解决方案
  

1)是否有可能恢复一个文件上传在客户端不使用闪光灯/爪哇/ Silverlight的?

没有。实际HTTP协议本身不支持部分上传的简历,所以即使你没有使用Flash或Silverlight,你仍然需要使用别的东西如FTP服务器上。
我已经解决在过去的这个问题写在C#这打破了文件分解成小块(2meg)定制的客户端应用程序,单独发送者,然后在服务器合并它们重新走到一起。

  

2)任何人都不会有一些code或A链接到介绍如何编写一个.NET的HttpHandler,使流上传和Ajax的进度条?

文章

虽然这并没有解决'恢复'问题,我使用 SWFUpload的在客户端和它的工作出色。它提供了一个智能文件浏览器(在这里您可以提示只JPEG文件,等用户)和上传进度跟踪,都无需修改你的服务器的。

I've done a good bit of research to find an upload component for .NET that I can use to upload large files, has a progress bar, and can resume the upload of large files. I've come across some components like AjaxUploader, SlickUpload, and PowUpload, to name a few. Each of these options cost money and only PowUpload does the resumable upload, but it does it with a java applet. I'm willing to pay for a component that does those things well, but if I could write it myself that would be best.

I have two questions:

  1. Is it possible to resume a file upload on the client without using flash/java/Silverlight?
  2. Does anyone have some code or a link to an article that explains how to write a .NET HTTPHandler that will allow streaming upload and an ajax progress bar?

Thank you,
Austin

[Edit]

I realized I do need to be able to do resumable file uploads for my project, any suggestions for components that can do that?

解决方案

1) Is it possible to resume a file upload on the client without using flash/java/Silverlight?

No. The actual HTTP protocol itself does not support resume of partial uploads, so even if you did use flash or silverlight, you'd still need to use something else like FTP on the server.
I've "solved" this problem in the past by writing a custom client application in C# which broke the file down into small chunks (2meg), transmitted those separately, and then the server combines them all back together.

2) Does anyone have some code or a link to an article that explains how to write a .NET HTTPHandler that will allow streaming upload and an ajax progress bar?

While this doesn't solve the 'resume' problem, I've used SWFUpload on the client side and it worked brilliantly. It provides a smart file browser (where you can prompt the user for only jpeg files, etc) and upload progress tracking, all without needing to modify your server at all.

这篇关于上传的.NET大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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