Hello all,
I'm having an issue with my java uploader. I am creating a MultipartEntity but something is padding the file size with an additional 234 bytes so the upload is failing.
in the following code, contentLength is 1241572 bytes but my actual file size is 1241338 bytes.
Can someone tell me what is adding these additional bytes or how to bebug this?
The upload fails because the server responds with "Body size does not match filesize."
File file = new File(tempPath + '/' + "upload-test.mov"); MultipartEntity entity = new MultipartEntity(); ContentBody body = new FileBody(file, "multipart/mixed"); entity.addPart("upload-test.mov", body); long contentLength = entity.getContentLength(); //content length is larger than source file by 234 bytes
(I noticed when I change the mime type to something other than "multipart/mixed" the content size changes.. I just want raw data!)
Thanks for any help.
-Tavis