mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Merge branch 'imp/12.0/attachment_minio__mimetype' into '12.0'
imp/12.0/attachment_minio__mimetype into 12.0 See merge request hibou-io/hibou-odoo/suite!359
This commit is contained in:
@@ -85,7 +85,10 @@ class MinioAttachment(models.Model):
|
||||
client = self._get_minio_client()
|
||||
bucket = self._get_minio_bucket(client)
|
||||
minio_key = self._get_minio_key(key)
|
||||
client.put_object(bucket, minio_key, io.BytesIO(bin_data), len(bin_data))
|
||||
client.put_object(
|
||||
bucket, minio_key, io.BytesIO(bin_data), len(bin_data),
|
||||
content_type=self.mimetype,
|
||||
)
|
||||
return self._get_minio_fname(bucket, minio_key)
|
||||
return super(MinioAttachment, self)._store_file_write(key, bin_data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user