Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8933131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:27:57+00:00 2026-06-15T09:27:57+00:00

My server side code is the following (just for the sake of testing it):

  • 0

My server side code is the following (just for the sake of testing it):

def upload = Action(parse.maxLength(maxLength = 10*1024, parser.multipartFormData)) {
    implicit request =>
      Logger.info("data: " + request.body.dataParts)
      Logger.info("file: " + request.body.file("picture"))
      Logger.info("req: " + request.contentType)
      Logger.info("req body: " + request.body)
      Ok("File has been uploaded")
}

My client side code is a simple form that has an input of type file.

 @helper.form(action = routes.Application.upload, 'enctype -> "multipart/form-data") {
    <p>
      <input type="text" name="name" />
    </p>
    <p>
      <input id="imageFile" type="file" name="picture" accept="image/*" />
    </p>
    <p>
      <input type="submit" value="Save" />
    </p>
  }

The problem is that if you try to upload files that are bigger than 10KB the browser will hang waiting for the server to finish even though it appears that the server has finished consuming the request. How to solve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:27:59+00:00Added an answer on June 15, 2026 at 9:27 am

    Unfortunately, there seems to be a problem related to this in Play 2.0.4 and the browser will hang waiting for the file to finish uploading even though the request body has been consumed in the server side. A discussion regarding the issue can be found here and it was reported here (play doesn’t finish consuming request if maxlength is reached).

    Fortunately, this has been resolved in Play 2.1 and the first release candidate is already available. So, the best thing to do would be to migrate your app to Play 2.1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following node.js server-side code: var app = require('http').createServer(handler) , io =
I am getting a date from server side C# using the following code: DateTime
In my server side code I'm creating the following response object: var response =
I created cookie with server side code (c#) and it was shown in chrome
here is the server side code of my program, the problem is, its accepting
I require ASP.NET server side code in a SVG that I created. To accomplish
I have my server side code create an event on Facebook, using a Facebook
I have a server-side code using .NET Remoting to establish the connection with client.
When writing server-side code you need to explicitly stop execution after sending a Location:
If I have pages having server-side code in code-behind, then I know that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.