Reputation: 935
I have a form where the user is only allowed to upload pdf files. I use the following struts action to limit the size and file type, but only the size limit works. Any ideas on what I am missing? Thanks!
<action name="commentAction" class = "gov.mo.dnr.rat.controller.comment.CommentAction">
<interceptor-ref name="validUserStack">
<param name="fileUpload.maximumSize">5242880</param>
<param name="allowedTypes">application/pdf</param>
</interceptor-ref>
<result name="success" type="tiles">comment</result>
<result name="input" type="tiles">comment</result>
</action>
Upvotes: 0
Views: 2160
Reputation: 935
I found the problem. The allowedTypes
should be fileUpload.allowedTypes
, in this case.
Upvotes: 1