[Feature][ActiveStorage] Automatic storage deduplication (configurable)

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

[Feature][ActiveStorage] Automatic storage deduplication (configurable)

Dmitry Arkhipov
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.