通过HTTP实现大文件上传 [英] Implementing large file uploads via HTTP

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

问题描述

我需要创建一个基于Apache Tomcat的Web应用程序,它可以通过HTTP(多部分表单POST请求)接收大量(100 MB或更多)的文件。



我尝试了Apache Commons Fileupload,它适用于较小的文件(20-40 MB)。但它不适用于大文件。



是否有任何明显的方式来实现大文件上传,除了


  1. 在客户端使用Java applet,
  2. 调整Tomcat的设置?


    Update 1(03.10.2013):这是我在服务器端上传2个文件时遇到的异常。 120的总大小。



    解决方案

    我找到了另一个解决方案。在FileUpload的网站上有关于Streaming API的页面



    该页面的代码片段解决了我的问题。


    I need to create a web application based on Apache Tomcat, which can receive large (100 MB or more) files via HTTP (multipart form POST request).

    I tried Apache Commons Fileupload and it works for smaller files (20-40 MB). But it doesn't work for large files.

    Are there any obvious ways to implement large file upload except

    1. using Java applet at the client side,
    2. tweaking Tomcat's settings?

    Update 1 (03.10.2013): Here's the exception that I get at the server side when uploading 2 files with approx. 120 total size.

    解决方案

    I found another solution. On the FileUpload's web site there is a page about the Streaming API.

    The code snippet on that page solved my problem.

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

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