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 Answers1

4

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