feat(pj): change naming scheme to %Y/%m/%d/sd/sd.....
This commit is contained in:
parent
d2f1af0830
commit
db70624398
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ class PjsMigrationJob < ApplicationJob
|
||||||
client = service.client
|
client = service.client
|
||||||
container = service.container
|
container = service.container
|
||||||
old_key = blob.key
|
old_key = blob.key
|
||||||
new_key = "#{blob.created_at.year}/#{old_key[0..1]}/#{old_key[2..3]}/#{old_key}"
|
new_key = "#{blob.created_at.strftime('%Y/%m/%d')}/#{old_key[0..1]}/#{old_key}"
|
||||||
|
|
||||||
excon_response = client.copy_object(container,
|
excon_response = client.copy_object(container,
|
||||||
old_key,
|
old_key,
|
||||||
|
|
|
@ -10,7 +10,7 @@ ActiveSupport.on_load(:active_storage_blob) do
|
||||||
|
|
||||||
def self.generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH)
|
def self.generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH)
|
||||||
token = super
|
token = super
|
||||||
"#{Time.current.year}/#{token[0..1]}/#{token[2..3]}/#{token}"
|
"#{Time.current.strftime('%Y/%m/%d')}/#{token[0..1]}/#{token}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue