Class: DownloaderExtension
- Inherits:
-
ActiveStorage::Downloader
- Object
- ActiveStorage::Downloader
- DownloaderExtension
- Defined in:
- lib/active_storage/service/image_kit_io_service.rb
Overview
Overwrite the ActiveStorage::Downloader’s open method and remove the file integrity check constraint method verify_integrity_of
Instance Method Summary collapse
Instance Method Details
#open(key, checksum:, name: "ActiveStorage-", tmpdir: nil, **options) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/active_storage/service/image_kit_io_service.rb', line 6 def open(key, checksum:, name: "ActiveStorage-", tmpdir: nil, **) open_tempfile(name, tmpdir) do |file| download key, file # verify_integrity_of file, checksum: checksum yield file end end |