Class: Google::APIClient::UploadIO
- Inherits:
-
Faraday::Multipart::FilePart
- Object
- Faraday::Multipart::FilePart
- Google::APIClient::UploadIO
- Defined in:
- lib/google/api_client/media.rb
Overview
Uploadable media support. Holds an IO stream & content type.
Instance Attribute Summary collapse
-
#chunk_size ⇒ Fixnum
Size of chunks to upload.
Instance Method Summary collapse
-
#length ⇒ Fixnum
Get the length of the stream.
Instance Attribute Details
#chunk_size ⇒ Fixnum
Returns Size of chunks to upload. Default is nil, meaning upload the entire file in a single request.
28 29 30 |
# File 'lib/google/api_client/media.rb', line 28 def chunk_size @chunk_size end |
Instance Method Details
#length ⇒ Fixnum
Get the length of the stream
35 36 37 |
# File 'lib/google/api_client/media.rb', line 35 def length io.respond_to?(:length) ? io.length : File.size(local_path) end |