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
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
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? 

thank you for listening.
Reply all
Reply to author
Forward
0 new messages