Grails upload file no signature for method getFile()

后端 未结 1 679
甜味超标
甜味超标 2020-12-19 10:48

I am implementing simple form with input fields and file upload. I went over tutorial: http://grails.org/Simple+Avatar+Uploader and documentation: http://grails.org/doc/2.0.

相关标签:
1条回答
  • 2020-12-19 11:07

    By the type in your stack trace, the Spring Security @Secured annotation is wrapping your request in a SecurityContextHolderAwareRequestWrapper. You need to get at the MultipartHttpServletRequest to call getFile I believe.

    Also, in your debug Here are params statement, are you seeing the itemImage? If so, I actually think it might be this easy.

    def file = params.itemImage
    

    UPDATE: I upvoted the comments. They weren't there when I started typing.

    0 讨论(0)
提交回复
热议问题