I\'m trying upload a Image from my Android APP to Amazon AWS S3 and I need use AWS Restful API.
I\'m using Retrofit 2
You can use retrofit 2 to upload the image/file
@Multipart
@POST("/api/attachment")
Call addAttachment(@Part MultipartBody.Part imageFile);
Now to make the call:
RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
MultipartBody.Part imageFileBody = MultipartBody.Part.createFormData("file", file.getName(), requestBody);
Note : Make sure you are using retrofit2 as for some reason I was unable to upload image using retrofit1 library.