camptocamp/odoo-cloud-platform

attachment_s3: One directory per database

max3903 opened this issue · 6 comments

Context

Using version 12.0 with Digital Ocean Spaces

Steps to reproduce

  • Setup the AWS environment variables
  • Create a database "MASTER"

Result

  • Files are stored directly in /BUCKETNAME/

Expected result

  • Files are stored in /BUCKETNAME/MASTER/

@guewen Is there any limitation to implementing this? Do you mind if I give it a shot?

I don't see any limitation, beside the fact that it should support both at least for backward compatibility (variable to chose one mode or the other?).

@p-tombez may have other thoughts

I have no objections

@guewen What about migrating instead of supporting 2 modes? If there is no directory in the bucket corresponding to the database name, we create one and move the files.

Followup of this discussion here:

https://github.com/camptocamp/odoo-cloud-platform/pull/218/files#r611813798

Backward compatibility is important because buckets cannot be renamed.

Closing as fixed for version 11.0 to 14.0