Use secure token to create attachment links
The link is public but protected by a secure token. This extends the activesupport Attachment model to automatically generate a token
This commit is contained in:
3
config/initializers/attachment_tokens.rb
Normal file
3
config/initializers/attachment_tokens.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
Rails.configuration.to_prepare do
|
||||
ActiveStorage::Attachment.send(:has_secure_token)
|
||||
end
|
||||
Reference in New Issue
Block a user