feat: change pj token to year/aa/bb/token to spread pjs under namespaces

This commit is contained in:
simon lehericey 2023-06-21 15:16:55 +02:00
parent 8282403c07
commit 7ce7a3f62c

View file

@ -7,6 +7,11 @@ ActiveSupport.on_load(:active_storage_blob) do
include BlobTitreIdentiteWatermarkConcern
include BlobVirusScannerConcern
include BlobSignedIdConcern
def self.generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH)
token = super
"#{Time.current.year}/#{token[0..1]}/#{token[2..3]}/#{token}"
end
end
ActiveSupport.on_load(:active_storage_attachment) do