Reputation: 11
all the tutorials that i have seen tend to treat an image as a stand alone model and send it using a FormData , what i want is to include the image file as a property of an object Called Course,
what is the process to do so , and in what way should i receive my image in the back-end if it was a property of a model
Upvotes: 0
Views: 219
Reputation: 360
You can use it by using an @Multipart annotation and getting the image as MultiPartBody.part. You can check in the below link for more detailed explanation. How to Upload Image file in Retrofit 2
Upvotes: 1