method

download_chunk

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: S3Service
download_chunk(key, range) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activestorage/lib/active_storage/service/s3_service.rb, line 41
    def download_chunk(key, range)
      instrument :download_chunk, key: key, range: range do
        object_for(key).get(range: "bytes=#{range.begin}-#{range.exclude_end? ? range.end - 1 : range.end}").body.read.force_encoding(Encoding::BINARY)
      rescue Aws::S3::Errors::NoSuchKey
        raise ActiveStorage::FileNotFoundError
      end
    end
Register or log in to add new notes.