title: Play Framework File Upload is not working and giving error: Action not found
body: <p>I'm running application on Play framework 2.2.3. As I'm trying to upload a file/image into a given path. After hitting the Submit button, I'm getting the below error.Please let me know where I'm doing wrong ?</p>
  
  <p>Error:</p>
  
  <pre><code>Action not found 
  For request 'GET /routes.ApplicationController.upload?picture=Image.png'
  
  App.html: 
  
  @form(action = routes.ApplicationController.upload, 'enctype -&gt; "multipart/form-data") {
  
      &lt;input type="file" name="picture"&gt;
  
      &lt;p&gt;
          &lt;input type="submit"&gt;
      &lt;/p&gt;
  
  }
  </code></pre>
  
  <p>routes:</p>
  
  <pre><code>POST            /upload             controllers.ApplicationController.upload()
  </code></pre>
  
  <p>ApplicationController.java:</p>
  
  <pre><code>public static Result upload()
      {
          MultipartFormData body = request().body().asMultipartFormData();
          FilePart uploadedFile = body.getFile("picture");
          if (uploadedFile != null) {
             String fileName = uploadedFile.getFilename();
             String contentType = uploadedFile.getContentType();
             File file = uploadedFile.getFile();
             // file.renameTo(new File(play.Play.application().path().getAbsolutePath() + "/" + fileName));
             file.renameTo(new File("D:/Test/images/" +fileName));
             return ok("File uploaded");
         }
         else
         {
             return badRequest("No file uploaded.");
          }
  }
  </code></pre>