title: uploading a file in grails
body: <p>I am trying to upload a file in grails in my gsp I have:</p>
  
  <pre><code>&lt;g:form id="update" url="[action: 'updateStatus',]"&gt;
       &lt;g:textArea name="message" value="" cols="3" rows="1"/&gt;&lt;br/&gt;
       &lt;g:textField id="tagField" name="tag" value=""/&gt;&lt;br/&gt;
       &lt;input id="inputField" type="file" name="myFile" enctype="multipart/form-data" /&gt;
       &lt;g:submitButton name="Update Status"/&gt;
   &lt;/g:form&gt;
  </code></pre>
  
  <p>In my controller i have:</p>
  
  <pre><code> def updateStatus(String message) {
  
          if (params.myFile){
              def f = request.getFile('myFile')
  
          }
  </code></pre>
  
  <p>The request get file is failing with this error:</p>
  
  <pre><code>No signature of method: org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestWrapper.getFile() is applicable for argument types: (java.lang.String) values: [myFile]
  </code></pre>
  
  <p>Any ideas why this is as I have and are using getFile in my other controllers which works fine.</p>