config/initializers/azure_storage_service_patch.rb
# Reads the object for the given key in chunks, yielding each to the block.
Reads the object for the given key in chunks, yielding each to the block.
Reads the object for the given key in chunks yielding each to the block .
def stream(key)
        blob = blob_for(key)
        chunk_size = 5.megabytes
        offset = 0
        raise ActiveStorage::FileNotFoundError unless blob.present?
        while offset < blob.properties[:content_length]
          _, chunk = client.get_blob(container, key, start_range: offset, end_range: offset + chunk_size - 1)
          yield chunk.force_encoding(Encoding::BINARY)
          offset += chunk_size
        end
      end
def stream ( key ) blob = blob_for ( key ) chunk_size = 5 . megabytes offset = 0 raise ActiveStorage :: FileNotFoundError unless blob . present? while offset < blob . properties [ :content_length ] _ , chunk = client . get_blob ( container , key , start_range : offset , end_range : offset + chunk_size - 1 ) yield chunk . force_encoding ( Encoding :: BINARY ) offset += chunk_size end end
Reads the object for the given key in chunks, yielding each to the block.
Reads the object for the given key in chunks yielding each to the block .
key
<not_specific>