Option to prevent duplicate uploads in ActiveStorage
12 views
Skip to first unread message
Greg S
unread,
Jan 27, 2020, 10:13:51 PM1/27/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Core
Use case: I may the same scan as a reference for a many records and don't want to upload multiple copies.
Would have to be optional and deletions would be more difficult. I can't say as I understand AS very well.
thank you for listening.
Greg S
unread,
Jan 28, 2020, 12:04:44 AM1/28/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Core
OP correcting errors. Sorry. Updated below, ignore original
Use case: I may use the same scan as a reference for many records and don't want to have multiple copies. In other words when I create a record I am using the information on the scan and want to show that scan with the record.
Would have to be optional and deletions would be more difficult. I can't say as I understand AS very well.
Or would it be better to check for duplicate after uploading, change active_records_attachment to point to the blob_id that was added first and then delete the just uploaded duplicate?