[struts-site] branch asf-site updated: Updates production by Jenkins
This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/struts-site.git The following commit(s) were added to refs/heads/asf-site by this push: new 8d23209 Updates production by Jenkins 8d23209 is described below commit 8d232094f6624d7166a457e9a78ecbcfa3db Author: jenkins AuthorDate: Wed Nov 14 07:01:06 2018 + Updates production by Jenkins --- content/core-developers/file-upload.html | 209 ++- 1 file changed, 125 insertions(+), 84 deletions(-) diff --git a/content/core-developers/file-upload.html b/content/core-developers/file-upload.html index 1258914..5c0e789 100644 --- a/content/core-developers/file-upload.html +++ b/content/core-developers/file-upload.html @@ -127,13 +127,48 @@ << back to Core Developers Guide https://github.com/apache/struts-site/edit/master/source/core-developers/file-upload.md; title="Edit this page on GitHub">Edit on GitHub -File Upload - -The Struts 2 framework provides built-in support for processing file uploads that conform to http://www\.ietf\.org/rfc/rfc1867\.txt;>RFC 1867^[http://www.ietf.org/rfc/rfc1867.txt], “Form-based File Upload in HTML”. When correctly configured the framework will pass uploaded file(s) into your Action class. Support for individual and multiple file uploads are provided. When a file is uploaded it will typically be stored in a temporary directory. Uploaded files should be proc [...] +File Upload + + + Dependencies + Struts 2.0.x File Upload Dependencies + Struts 2.1.x File Upload Dependencies + + + Basic Usage + Example action mapping: + Example JSP form tags: + Example Action class: + + + Uploading Multiple Files + Uploading Multiple Files using Arrays + Uploading Multiple Files using Lists + + + Advanced Configuration + File Size Limits + File Types + Error Messages + Temporary Directories + Alternate Libraries + Request validation + Disabling file upload support + + + + +The Struts 2 framework provides built-in support for processing file uploads that conform to http://www.ietf.org/rfc/rfc1867.txt;>RFC 1867, +“Form-based File Upload in HTML”. When correctly configured the framework will pass uploaded file(s) into your Action class. +Support for individual and multiple file uploads are provided. When a file is uploaded it will typically be stored in a temporary directory. +Uploaded files should be processed or moved by your Action class to ensure the data is not lost. Be aware that servers may have a security +policy in place that prohibits you from writing to directories other than the temporary directory and the directories that belong to your +web application. Dependencies -The Struts 2 framework leverages add-on libraries to handle the parsing of uploaded files. These libraries are not included in the Struts distribution, you must add them into your project. The libraries needed are: +The Struts 2 framework leverages add-on libraries to handle the parsing of uploaded files. These libraries are not included in the Struts +distribution, you must add them into your project. The libraries needed are: @@ -148,14 +183,14 @@ Commons-FileUpload - http://commons\.apache\.org/fileupload/;>http://commons.apache.org/fileupload/ + http://commons.apache.org/fileupload/;>http://commons.apache.org/fileupload/ 1.1.1 1.2.1 1.3.2 Commons-IO - http://commons\.apache\.org/io/;>http://commons.apache.org/io/ + http://commons.apache.org/io/;>http://commons.apache.org/io/ 1.0 1.3.2 2.4 @@ -165,7 +200,7 @@ If you are using Maven then you can add these libraries as dependencies in your project’s pom.xml. -Struts 2.0.x File Upload Dependencies +Struts 2.0.x File Upload Dependencies dependency groupIdcommons-fileupload/groupId @@ -177,11 +212,10 @@ artifactIdcommons-io/artifactId version1.0/version /dependency - -Struts 2.1.x File Upload Dependencies +Struts 2.1.x File Upload Dependencies dependency groupIdcommons-fileupload/groupId @@ -193,15 +227,16 @@ artifactIdcommons-io/artifactId version1.3.2/version /dependency - Basic Usage -The org.apache.struts2.interceptor.FileUploadInterceptor class is included as part of the defaultStack. As long as the required libraries are added to your project you will be able to take advantage of of the Struts 2 fileUpload capability. Configure an Action mapping for your Action class as you typically would. +The org.apache.struts2.interceptor.FileUploadInterceptor class is included as part of the defaultStack. As long as the required libraries +are added to your project you will be able to take advantage of of the Struts 2
[struts-site] branch master updated: Cleans up file upload documentation
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git The following commit(s) were added to refs/heads/master by this push: new e59291b Cleans up file upload documentation e59291b is described below commit e59291b0ff69cf96f57f04918284cb931753d8da Author: Lukasz Lenart AuthorDate: Wed Nov 14 07:52:56 2018 +0100 Cleans up file upload documentation --- source/core-developers/file-upload.md | 203 +- 1 file changed, 104 insertions(+), 99 deletions(-) diff --git a/source/core-developers/file-upload.md b/source/core-developers/file-upload.md index c6ae227..fddca06 100644 --- a/source/core-developers/file-upload.md +++ b/source/core-developers/file-upload.md @@ -4,23 +4,32 @@ title: File Upload --- # File Upload +{:.no_toc} -The Struts 2 framework provides built\-in support for processing file uploads that conform to [RFC 1867](http://www\.ietf\.org/rfc/rfc1867\.txt)^[http://www\.ietf\.org/rfc/rfc1867\.txt], "Form\-based File Upload in HTML"\. When correctly configured the framework will pass uploaded file(s) into your Action class\. Support for individual and multiple file uploads are provided\. When a file is uploaded it will typically be stored in a temporary directory\. Uploaded files should be processed [...] +* Will be replaced with the ToC, excluding a header +{:toc} + +The Struts 2 framework provides built-in support for processing file uploads that conform to [RFC 1867](http://www.ietf.org/rfc/rfc1867.txt), +"Form-based File Upload in HTML". When correctly configured the framework will pass uploaded file(s) into your Action class. +Support for individual and multiple file uploads are provided. When a file is uploaded it will typically be stored in a temporary directory. +Uploaded files should be processed or moved by your Action class to ensure the data is not lost. Be aware that servers may have a security +policy in place that prohibits you from writing to directories other than the temporary directory and the directories that belong to your +web application. ## Dependencies -The Struts 2 framework leverages add\-on libraries to handle the parsing of uploaded files\. These libraries are not included in the Struts distribution, you must add them into your project\. The libraries needed are: +The Struts 2 framework leverages add-on libraries to handle the parsing of uploaded files. These libraries are not included in the Struts +distribution, you must add them into your project. The libraries needed are: -|Library|URL|Struts 2\.0\.x|Struts 2\.1\.x|Struts 2\.5\.x| +|Library|URL|Struts 2.0.x|Struts 2.1.x|Struts 2.5.x| |---|---|--|--|--| -|Commons\-FileUpload|[http://commons\.apache\.org/fileupload/](http://commons\.apache\.org/fileupload/)|1\.1\.1|1\.2\.1|1\.3\.2| -|Commons\-IO|[http://commons\.apache\.org/io/](http://commons\.apache\.org/io/)|1\.0|1\.3\.2|2\.4| - -If you are using Maven then you can add these libraries as dependencies in your project's pom\.xml\. +|Commons-FileUpload|[http://commons.apache.org/fileupload/](http://commons.apache.org/fileupload/)|1.1.1|1.2.1|1.3.2| +|Commons-IO|[http://commons.apache.org/io/](http://commons.apache.org/io/)|1.0|1.3.2|2.4| -**Struts 2\.0\.x File Upload Dependencies** +If you are using Maven then you can add these libraries as dependencies in your project's pom.xml. +### Struts 2.0.x File Upload Dependencies ```xml @@ -33,11 +42,9 @@ If you are using Maven then you can add these libraries as dependencies in your commons-io 1.0 - ``` -**Struts 2\.1\.x File Upload Dependencies** - +### Struts 2.1.x File Upload Dependencies ```xml @@ -50,15 +57,15 @@ If you are using Maven then you can add these libraries as dependencies in your commons-io 1.3.2 - ``` ## Basic Usage -The `org.apache.struts2.interceptor.FileUploadInterceptor` class is included as part of the `defaultStack`\. As long as the required libraries are added to your project you will be able to take advantage of of the Struts 2 fileUpload capability\. Configure an Action mapping for your Action class as you typically would\. - -**Example action mapping:** +The `org.apache.struts2.interceptor.FileUploadInterceptor` class is included as part of the `defaultStack`. As long as the required libraries +are added to your project you will be able to take advantage of of the Struts 2 fileUpload capability. Configure an Action mapping for your +Action class as you typically would. +### Example action mapping: ```xml @@ -67,26 +74,23 @@ The `org.apache.struts2.interceptor.FileUploadInterceptor` class is included as ``` -A form must be create with a form field of type file, ``\. The form used to upload the file must have its encoding type set to multipart/form\-data, -``\. The standard
svn commit: r1036901 - /websites/production/struts/content/
Author: lukaszlenart Date: Tue Nov 13 15:13:04 2018 New Revision: 1036901 Log: Drops outdated docs Removed: websites/production/struts/content/