I am getting an error when uploading a file with UTF-8 characters as multipart/form-data in Grails.
I am using the Form below;
<form action="uploadPost" enctype="multipart/form-data; charset=utf-8" method="POST">
<label class="form-titles" for="csvList">Choose a file: </label>
<input type="file" id="csvList" name="csvList" style="width: 200px;"/>
<input type="submit"/>
In the controller I have:
def file = request.getFile('csvList')
This causes the error:
ERROR [org.codehaus.groovy.grails.web.errors.GrailsExceptionResolver] - No signature of method: org.springframework.security.wrapper.SavedRequestAwareWrapper.getFile() is applicable for argument types: (java.lang.String) values: [userList] Possible solutions: getXML(), getAt(java.lang.String), getAt(java.lang.String), getLocale(), getLocale(), getJSON()>
I think this will be same in Java.
Any idea what I am doing wrong and how to get UTF-8 charset in multipart form?