Boto3, how to disable ACL when using generate_presigned_url?

I keep getting this error:

An error occurred (AccessControlListNotSupported) when calling the PutObject operation: The bucket does not allow ACLs

I'm switching to chunked uploads, previously i could do below and this uploaded fine.

original = models.FileField(storage=S3Boto3Storage(bucket_name='video-sftp',default_acl=None),upload_to='', blank=False, null=False)

Now i'm using generate_presigned_url and the ACL parameter is being ignored.

 url = client.generate_presigned_url(
            ClientMethod="put_object",
            Params={
                "Bucket": "video-sftp",
                "Key": f"{json.loads(request.body)['fileName']}",
                "ACL": "None"
            },
            ExpiresIn=300,
        )

How do i solve?

Back to Top