Option to prevent duplicate uploads in ActiveStorage

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Option to prevent duplicate uploads in ActiveStorage

Greg S
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.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-core/ac9d106c-b9df-4355-a530-b3b151b30708%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Option to prevent duplicate uploads in ActiveStorage

Greg S
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.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-core/645b3886-7816-4017-aaa5-5bf3bc8399e0%40googlegroups.com.