mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 08:47:40 +00:00
[IMP]: Allow to pass storage as a context key
This commit is contained in:
@@ -131,7 +131,8 @@ class IrAttachment(models.Model):
|
||||
|
||||
@api.model
|
||||
def _store_file_write(self, key, bin_data):
|
||||
if self._storage() == 's3':
|
||||
location = self.env.context.get('storage_location') or self._storage()
|
||||
if location == 's3':
|
||||
bucket = self._get_s3_bucket()
|
||||
obj = bucket.Object(key=key)
|
||||
file = io.BytesIO()
|
||||
|
||||
Reference in New Issue
Block a user