拆分大文件Asp.net [英] Splitting Large Files Asp.net

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

问题描述


我想知道是否有人尝试过类似的事情.

基本我有较大的文件可以上传100MB-200MB.

我想要做的是将这些文件分成较小的块,然后上传.

然后在服务器上将文件重建为原始文件.

如果有人对如何实现此目标有任何建议或教程,将不胜感激.

问候
Mc--Gann

Hi
I was wondering if anyone has attempted anything similar to this.

Basic I have large files for uploading 100MB - 200MB.

What I want to do is split these files into smaller chunks and upload them.

Then on the server rebuild the file into its original.

If anyone has any suggestions or a tutorial on how to achieve this it would be greatly appreciated.

Regards
Mc--Gann

推荐答案

在此处 ^ ].如果此客户端是受信任的来源,则您共享一个实用程序来拆分文件,并让它们上传较小的块.

您可以在服务器上使用相同的实用程序将它们加入.

如果客户端不受信任,则此方法可能无法正常工作.
Take a look at the file splitter program here File Splitter Utility in C# - WinForms[^]. If this the client is a trusted source then you share a utility to split the files and let them upload smaller chunks.

you can use the same utility program at the server to join them.

This might not work if the client is not a trusted.


您可以查看本文,该文章向您展示了创建缓冲上传的技术

Dime缓冲上传 [
''简单的答案是否",您需要了解网络浏览器永远不会为客户端文件系统提供高级文件IO.如果需要更多说明,请阅读其他评论.''

在浏览器应用程序中,选择上传文件时,只能选择文件的位置,然后将其作为HTTP Post发送到服务器.如该答案所述,您将没有机会分割文件并分块发送.

但是,您可以实施某种与浏览器进行通信的客户端服务,然后让该服务执行缓冲的上载.我认为有一些Flash组件可以让您按照这些思路去做些事情?
You can have a look at this article that show you a technique for creating a buffered upload

Dime Buffered Upload[^]

However, pay attention to one of the questions in the forum ''Can I use this in a web application''

''the simple answer is no, and you need to understand that a web browser will never offer advanced file IO to the client file system. have a read of the other comments if you need more explanation.''

In a browser application, when you choose to upload a file, you only get a choice of where the file is located and then it is sent as an HTTP Post to the server. As explained in that answer, you won''t have the opportunity to split a file and send in chunks.

However, you could implement some sort of client service that the browser communicates with, then have the service perform the buffered upload. I think there are some flash components that let you do something along these lines?


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

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