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:
1 parent
ad317e917d
commit
73c184a4a0
5 files changed
+14
-3
No files matched your search
@@ -0,0 +1,6 @@
|
||||
class AddTokenToAttachments < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :active_storage_attachments, :token, :string
|
||||
add_index :active_storage_attachments, :token, unique: true
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user