Module: Vimeo::Advanced::SimpleUpload

Included in:
Upload
Defined in:
lib/vimeo/advanced/simple_upload.rb,
lib/vimeo/advanced/simple_upload/task.rb,
lib/vimeo/advanced/simple_upload/chunk.rb

Defined Under Namespace

Classes: Chunk, Task, UploadError

Instance Method Summary collapse

Instance Method Details

#upload(uploadable) ⇒ Object

Uploads data (IO streams or files) to Vimeo.



10
11
12
13
14
15
16
17
18
19
# File 'lib/vimeo/advanced/simple_upload.rb', line 10

def upload(uploadable)
  case uploadable
  when File, Tempfile
    upload_file(uploadable)
  when String
    upload_file(File.new(uploadable))
  else
    upload_io(uploadable)
  end
end