Commits

Anonymous committed 3ac5d39

- updated "file upload" showcase example to have a file limit of 2Mb and will show upload error upon exceeding this limit

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2869573baa09-0c28-0410-bef9-dab3c582ae83

Comments (0)

Files changed (2)

webapps/showcase/src/webapp/WEB-INF/classes/xwork-fileupload.xml

 		</action>
 
         <action name="doUpload" class="com.opensymphony.webwork.showcase.fileupload.FileUploadAction" method="upload">
+        	<interceptor-ref name="defaultStack">
+        		<param name="fileUpload.maximumSize">1048576</param>
+        	</interceptor-ref>
 			<result>upload-success.jsp</result>
+			<result name="input">upload.jsp</result>
 		</action>
 
     </package>

webapps/showcase/src/webapp/fileupload/upload.jsp

 <html>
 <head>
     <title>Showcase</title>
+    <ww:head />
 </head>
 
 <body>
     <h1>Fileupload sample</h1>
-
+	<p>There is a file upload limit of 1048576 bytes (approximately 2MB)</p>
+	
+	<ww:fielderror />
+	
+	<p/>
+	
     <ww:form action="doUpload" method="POST" enctype="multipart/form-data">
         <ww:file name="upload" label="File"/>
         <ww:textfield name="caption" label="Caption"/>