This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interrupting big file uploads to save traffic

 
Pushker Chaubey
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Experts,

When a huge file is uploaded, then is the request object available (and service invoked) only after the whole request body is materialized on server memory?

My problem is Whenever a huge file is uploaded I want to stop the upload as soon as I reach a limit of 20MB, thus avoiding the unnecessary traffic wastage.

I was thinking about checking for contentLength to find out the file size, but that will of no use if file has already been materialized on the server memory.

Any pointers on this are welcome!

Thanks and regards,
Pushker Chaubey
 
Travis Hein
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess if you had some kind of client side widget, such as an applet, to make the users upload with, that could do a check before hand and enforce maximum file size before uploading.
 
Pushker Chaubey
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. I just have plain html on the client side.

But I still wondering how is it possible to check the file size at client side using any applet code or javascript.

Thanks,
Pushker Chaubey
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic