Minio/AWS-S3 upload file using multipart

4.5k views Asked by At

I know that to upload binary file we should use multipart instead of Form-Urlencoded! but it seems like AWS-S3/Minio does not support it. Minio returns following error:

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NotImplemented</Code><Message>A header you provided
implies functionality that is not implemented</Message><Key></Key>
<BucketName></BucketName>
<Resource>/chats/k0ydjPjA6yIBKEOdlU3HzPCmaJdQfxz83z0VyC1m</Resource>
<RequestId>3L137</RequestId><HostId>3L137</HostId></Error>

I use retrofit 2 to create query like this

Call<Void> minio_uploadFile(@Url String url,@Part("file") RequestBody description,
 @Part MultipartBody.Part file,
 @QueryMap(encoded = true) Map<String,String>formData);

can anyone help me? or I must use Form-Urlencoded to upload files?!

0

There are 0 answers