I am using Retrofit 2.5.0 to upload images to a NodeJS Server,
When I try to upload images it gives me an error.
when I logged the request it doesn't read the full file and gives EOF exception.
I am using MultiPart to upload and this is my code snippet
RequestBody requestFile =
RequestBody.create(MediaType.parse("image/jpg"), file);
MultipartBody.Part body =
MultipartBody.Part.createFormData("image", file.getName(), requestFile);
// add another part within the multipart request
RequestBody fullName =
RequestBody.create(
MediaType.parse("multipart/form-data"), image.getDescription());
This is the okHttp log:
--------- beginning of main
10-30 14:25:45.330 11236-11402/com.project.peoject D/OkHttp: �Dw�m�1��l��n�D�RXZX�1[)$M��l�`���7Q���n�ӟ̊e��L�،����=�k����*a�~�g��=�U�ɨ@<�x���/���>� ���R���@���z�;c�?��Zʖ7��ۮ�0��*r�����#ך������3��J��F{���v� ����Kk�̌�$|�|
read: unexpected EOF!