• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

file upload functionality in Java

 
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
Marshal
Pie
Posts: 24212
35
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