码迷,mamicode.com
首页 > Web开发 > 详细

然后用apache实现文件上载功能

时间:2017-01-26 23:25:58      阅读:348      评论:0      收藏:0      [点我收藏+]

标签:request   package   content   method   file   

在apache官网的commons里面有实现库
Commons FileUpload

The Commons FileUpload package makes it easy to add        robust, high-performance, file upload capability to your servlets and        web applications.

FileUpload parses HTTP requests which conform to        RFC 1867,        "Form-based File Upload in HTML". That is, if an HTTP request is        submitted using the POST method, and with a content type of        "multipart/form-data", then FileUpload can parse that request, and        make the results available in a manner easily used by the caller.

Starting with version 1.3, FileUpload handles        RFC 2047 encoded header values.

The simplest way to send a multipart/form-data request to a server is via a web form, i.e.


<form method="POST" enctype="multipart/form-data" action="fup.cgi">
  File to upload: <input type="file" name="upfile"><br/>
  Notes about the file: <input type="text" name="note"><br/>
  <br/>
  <input type="submit" value="Press"> to upload the file!
</form>

然后用apache实现文件上载功能

标签:request   package   content   method   file   

原文地址:http://strongdady.blog.51cto.com/12535764/1894279

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!