Uploading compress image to server using retrofit
问题 I am using retrofit in my project. Now I need to upload an image on server using retrofit. So I need help in the following question: How to upload compressed bitmap to a server using retrofit in form data? Any link or example will be helpful. 回答1: Upload can be done using below steps Step 1: Create a method with below code UploadPhotoRetroService service = ServiceGenerator.createService(MyActivity.class, "base-url"); TypedFile typedFile = new TypedFile("image/jpeg", new File(imagePath));