I am trying to upload video files to a Bucket in S3 server from android app using a signed URLs which is generated from server side (coded in python) application. We are making a PUT request to the signed URL but we are getting
connection reset by peer exception
.
But when I try the same URL on the POSTMAN REST CLIENT get a success message. Any help will be appreciated.
Use dynamic URL instead of providing the base URL, use @Url instead of @Path and pass a complete URI, encode= false is by default
Eg:
@Multipart @PUT @Headers("x-amz-acl:public-read") Call<Void> uploadFile(@Url String url, @Header("Content-Type") String contentType, @Part MultipartBody.Part part);
Done this using Retrofit HTTP client library,it successfully uploaded file to Amazon s3 server.
code:
service class
and use: