class Para::ActiveStorageDownloader
Attributes
Public Class Methods
Source
# File lib/para/active_storage_downloader.rb, line 9 def initialize(attachment) @attachment = attachment end
Public Instance Methods
Source
# File lib/para/active_storage_downloader.rb, line 20 def download_blob_to_tempfile(&block) blob.open tmpdir: Dir.tmpdir, &block end
For versions of ActiveStorage that don’t have an ActiveStorage::Downloading module, we define the method ourselves, as defined in the ActiveStorage::Analyzer and ActiveStorage::Previewer classes, which is simple enough to be copied here.