Home > Enterprise >  POST requires exactly one file upload per request. MinIO express
POST requires exactly one file upload per request. MinIO express

Time:10-19

info i got from minio presigned Post Policy to upload there (i am using postman to upload) :

image

minio presigned Post Policy response :

{
"formData": {
        "bucket": "my-bucketname",
        "x-amz-date": "20221018T192249Z",
        "x-amz-algorithm": "AWS4-HMAC-SHA256",
        "x-amz-credential": "bQouSSfOuCnwbHNCR2JwhXaAmsZkWbxP/20221018/us-east-1/s3/aws4_request",
        "policy": "eyJjb25kaXRpb25zIjpbWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsMTAyNCwxMDQ4NTc2XSxbImVxIiwiJGJ1Y2tldCIsIm15LWJ1Y2tldG5hbWUiXSxbImVxIiwiJHgtYW16LWRhdGUiLCIyMDIyMTAxOFQxOTIyNDlaIl0sWyJlcSIsIiR4LWFtei1hbGdvcml0aG0iLCJBV1M0LUhNQUMtU0hBMjU2Il0sWyJlcSIsIiR4LWFtei1jcmVkZW50aWFsIiwiYlFvdVNTZk91Q253YkhOQ1IySndoWGFBbXNaa1dieFAvMjAyMjEwMTgvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJdXSwiZXhwaXJhdGlvbiI6IjIwMjItMTAtMjVUMTk6MjI6MDAuODEyWiJ9",
        "x-amz-signature": "9aa48b51ab34954fb744ca1a016ab481d30800ead186235f9331a31776c3fc13"
    },
    "postURL": "https://ghofly-uploads.chbk.run/my-bucketname"
}

i get error when im trying to upload a file to minio with the above information using post http method :

image

it says POST requires exactly one file upload per request. but i am sending only one file in the request's body... how can i fix this ?

headers & body & params :

headers image

body image

params image

complete upload URL which i used to upload a file to minio : https://ghofly-uploads.chbk.run/my-bucketname?bucket=my-bucketname&x-amz-date=20221018T192249Z&x-amz-algorithm=AWS4-HMAC-SHA256&x-amz-credential=bQouSSfOuCnwbHNCR2JwhXaAmsZkWbxP/20221018/us-east-1/s3/aws4_request&policy=eyJjb25kaXRpb25zIjpbWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsMTAyNCwxMDQ4NTc2XSxbImVxIiwiJGJ1Y2tldCIsIm15LWJ1Y2tldG5hbWUiXSxbImVxIiwiJHgtYW16LWRhdGUiLCIyMDIyMTAxOFQxOTIyNDlaIl0sWyJlcSIsIiR4LWFtei1hbGdvcml0aG0iLCJBV1M0LUhNQUMtU0hBMjU2Il0sWyJlcSIsIiR4LWFtei1jcmVkZW50aWFsIiwiYlFvdVNTZk91Q253YkhOQ1IySndoWGFBbXNaa1dieFAvMjAyMjEwMTgvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJdXSwiZXhwaXJhdGlvbiI6IjIwMjItMTAtMjVUMTk6MjI6MDAuODEyWiJ9&x-amz-signature=9aa48b51ab34954fb744ca1a016ab481d30800ead186235f9331a31776c3fc13

also the bucket already exists :

bucket image from panel

CodePudding user response:

Your file should be named 'file', not 'dd'.

See the documentation on how to upload using forms: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTForms.html and related pages.

  • Related