ByteArrayOutputStream to a FileBody
问题 I have a Uri to an image that was either taken or selected from the Gallery that I want to load up and compress as a JPEG with 75% quality. I believe I have achieved that with the following code: ByteArrayOutputStream bos = new ByteArrayOutputStream(); Bitmap bm = BitmapFactory.decodeFile(imageUri.getPath()); bm.compress(CompressFormat.JPEG, 60, bos); Not that I have tucked it into a ByteArrayOutputStream called bos I need to then add it to a MultipartEntity in order to HTTP POST it to a