Since ActiveStorage already stores file checksum, it migth be used as file 
identifier for storage deduplication.
When creating a new file ActiveStorage should first check if a file with 
whe same checksum already exists and, if so, not create a new blob, but 
attach (link) already existing one to the model. When destroying a model - 
links to other models should be checked to decide wheater to destroy the 
blob itself or not.
This behavios might be optional per application (ActiveStorage 
configuration) and per model (params to has_one/many_attached hooks).

-- 
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 rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to