2019-02-28 18:36:28 +01:00
|
|
|
ActiveStorage::Service.url_expires_in = 1.hour
|
2019-05-02 11:37:35 +02:00
|
|
|
|
2019-05-28 11:35:42 +02:00
|
|
|
# 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).
|
2019-05-16 18:59:34 +02:00
|
|
|
ActiveSupport.on_load(:active_storage_blob) { include BlobVirusScanner }
|