为什么我收到“FileUploadException:Stream意外结束"?使用 Apache Commons FileUpload? [英] Why did I get "FileUploadException: Stream ended unexpectedly" with Apache Commons FileUpload?

查看:90
本文介绍了为什么我收到“FileUploadException:Stream意外结束"?使用 Apache Commons FileUpload?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遇到这个异常的原因是什么:

What is the reason for encountering this Exception:

org.apache.commons.fileupload.FileUploadException: 
  Processing of multipart/form-data request failed. Stream ended unexpectedly

推荐答案

主要原因是底层套接字被关闭或重置.最常见的原因是用户在文件完全上传之前关闭了浏览器.或者在上传过程中互联网中断了.无论如何,服务器端代码应该能够优雅地处理这个异常.

The main reason is that the underlying socket was closed or reset. The most common reason is that the user closed the browser before the file was fully uploaded. Or the Internet was interrupted during the upload. In any case, the server side code should be able to handle this exception gracefully.

这篇关于为什么我收到“FileUploadException:Stream意外结束"?使用 Apache Commons FileUpload?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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