Merge pull request #7627 from aignatov-bio/ai-sci-10767-add-filename-to-asset-version-token

Add filename to asset token [SCI-10767]
This commit is contained in:
Martin Artnik 2024-06-05 10:20:39 +02:00 committed by GitHub
commit 9ed9b76883
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,7 +10,7 @@ class AssetSyncToken < ApplicationRecord
validates :token, uniqueness: true, presence: true
def version_token
asset.file.checksum
OpenSSL::Digest::SHA256.base64digest(asset.file.checksum + asset.file_name)
end
def token_valid?