class Google::Apis::Core::ResumableUpload

Defined in:

google/apis/core/resumable_upload.cr

Constant Summary

DEFAULT_CHUNK_SIZE = (8 * 1024) * 1024

Constructors

Instance Method Summary

Constructor Detail

def self.new(chunk_size : Int32 = DEFAULT_CHUNK_SIZE, total_size : Int64 = 0) #

[View source]

Instance Method Detail

def bytes_sent : Int64 #

[View source]
def bytes_sent=(bytes_sent : Int64) #

[View source]
def chunk_size : Int32 #

[View source]
def chunk_size=(chunk_size : Int32) #

[View source]
def initiate(host : String, path : String, headers : HTTP::Headers, metadata_json : String | Nil = nil) : String #

Initiate a resumable upload session


[View source]
def query_status(max_retries : Int32 = 3) : Int64 #

Query the upload status to resume


[View source]
def session_uri : String | Nil #

[View source]
def session_uri=(session_uri : String | Nil) #

[View source]
def total_size : Int64 #

[View source]
def total_size=(total_size : Int64) #

[View source]
def upload(source : IO, max_retries : Int32 = 3) : HTTP::Client::Response #

Upload the entire file in chunks


[View source]