class Google::APIClient::UploadIO

Uploadable media support. Holds an IO stream & content type.

@see Faraday::UploadIO @example

media = Google::APIClient::UploadIO.new('mymovie.m4v', 'video/mp4')

Public Instance Methods

length() click to toggle source

Get the length of the stream

@return [Fixnum]

Length of stream, in bytes
# File lib/google/api_client/media.rb, line 30
def length
  io.respond_to?(:length) ? io.length : File.size(local_path)
end