Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image upload

 
Swadesh Bera
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
When i send data through http post its well work for less than 2kb image but if image size greater than 2 kb then its conber encoding-type: chunked and server become colsed. I can't able to upload image...
So can any one help me,how i recover from this problem
As soon as pssible as its very argent...
Thanks
Swadesh
 
Jari Kemppinen
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Send the image array size to the servlet before you send the actual image bytes.

eg-
Midlet
os.writeInt(sendImage.length);

Server
int len = din.readInt ();
byte[] b = new byte[len];
din.readFully(b);

Good luck
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic