71227be37f
This reverts commit 0ff6c793ae
.
9 lines
398 B
Ruby
9 lines
398 B
Ruby
ActiveStorage::Service.url_expires_in = 1.hour
|
|
|
|
# In Rails 5.2, we have to hook at `on_load` on the blob themeselves, which is
|
|
# not ideal.
|
|
#
|
|
# Rails 6 adds support for `.on_load(:active_storage_attachment)`, which is
|
|
# cleaner (as it allows to enqueue the virus scan on attachment creation, rather
|
|
# than on blob creation).
|
|
ActiveSupport.on_load(:active_storage_blob) { include BlobVirusScanner }
|