Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

file upload functionality in Java  RSS feed

 
PraveenKumar Kannankutty
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Iam using the following piece of code for implementing a file upload functionality. Iam able to upload an image of size 250Mb using the following code using fileInputStream and OutputStream.

byte[] buffer = new byte[8192];
while((bytesRead = stream.read(buffer,0,8192))!= -1)
{
fileOutputStream.write(buffer,0,bytesRead);
}

But the same code doesnt holds good when I try to upload an image file o 500MB.

Can any suggests me a solution to fix this issue?

Thanks in Advance
Praveen.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Doesn't holds good" in what way? What happens?

You've only shown us one end of the connection -- what's happening at the other end?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!