2

i'm using Minio Server to handle files in my Flask API. I generate Presigned Url to upload images directly from Angular FrontEnd to save Backend resources.

Presign Url Generation works fine but when I upload my file from Postman or Angular Code, the file seems corrupted.

Postman get result

Same on the Minio web browser

Minio Web Browser Screenshot

I use simple code for presigned url generation :

    def get_presigned_get_url(self, bucket: str, object_path: str) -> str:
    url = self.client.presigned_get_object(
        bucket_name=bucket,
        object_name=object_path,
    )
    return url

def get_presigned_put_url(self, bucket: str, object_path: str) -> str:
    url = self.client.presigned_put_object(
        bucket_name=bucket,
        object_name=object_path,
    )
    return url

And PUT request on Postman

Postman PUT requests

Thanks for your help

1 Answer 1

6

The key in this case is how the file is uploaded from the postman. While uploading the file, you need to use Body > Binary > Select File, rather than using the Body > Form-Data.

Screenshot

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.