> > Why are you reading the entire file into a byte array? > That sounds right there like the OutOfMem error.
Because it's the only way that I know to get from a content Uri to the byte array that I use to create the FilePart element of the multipart message. It is possible to create the FilePart element using a File object (this handles even a 50MB file successfully, though it takes around half an hour to create, so I don't fancy using it in practice). However, I can't work from a File object, because I have to use the content Uri that is returned by ACTION_VIDEO_CAPTURE. Originally I did pass a File Uri as extra output to ACTION_VIDEO_CAPTURE, but that unfortunately breaks the 'retake' and 'delete' buttons on the video camera. > when you're about to do your multipart post just read a little, write > a little. Buffer the sending process, Thanks, but please could you explain what you mean by that? Perhaps with an example? Mark warned that creating buffers tends to clog up memory. Indeed, after increasing the buffer size to 1MB, as he predicted, I can now handle files up to about 5MB. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.

