You have to mention param -allowed types.
<interceptor-ref name="fileUpload">
<param
name="allowedTypes">image/png,image/gif,image/jpeg,text/plain</param>
</interceptor-ref>
</action>
-----Original Message-----
From: sajidbigler [mailto:[email protected]]
Sent: Monday, March 16, 2009 4:23 PM
To: [email protected]
Subject: Fileupload : Restricted contentType is working fine but no proper
error message is shown to user
Hi,
Please help me to show error messages.when we restrict the contentTypes as
shown in the link
http://struts.apache.org/2.0.11.1/docs/file-upload-interceptor.html
The contents are restricted but the error wont be shown to end user how to
make it work please help me!
struts.xml
<action name="MMSUpload"
class="com.teleparadigm.mms.application.mms.MMSUploadAction">
<interceptor-ref name="i18n" />
<interceptor-ref name="fileUpload">
image/png,image/gif,image/jpeg
</interceptor-ref>
<interceptor-ref name="basicStack" />
<interceptor-ref name="validation" />
<result name="input">/pages/ComposeMMS.jsp</result>
<result name="error">/pages/ComposeMMS.jsp</result>
<result>/pages/upload_success.jsp</result>
</action>
Thanks,
Sajid
--
View this message in context:
http://www.nabble.com/Fileupload-%3A-Restricted-contentType-is-working-fine-
but-no-proper-error-message-is-shown-to-user-tp22535689p22535689.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]