Class: DropboxApi::Endpoints::Files::UploadSessionFinish

Inherits:
ContentUpload show all
Includes:
OptionsValidator
Defined in:
lib/dropbox_api/endpoints/files/upload_session_finish.rb

Constant Summary collapse

Method =
:post
Path =
"/2/files/upload_session/finish".freeze
ResultType =
DropboxApi::Metadata::File
ErrorType =
DropboxApi::Errors::UploadSessionFinishError

Instance Method Summary collapse

Methods included from OptionsValidator

#validate_options

Methods inherited from ContentUpload

#build_request, #initialize, #perform_request

Methods inherited from Base

add_endpoint

Constructor Details

This class inherits a constructor from DropboxApi::Endpoints::ContentUpload

Instance Method Details

#upload_session_finish(cursor, commit, content = nil) ⇒ Object

Finish an upload session and save the uploaded data to the given file path.

A single request should not upload more than 150 MB.

The maximum size of a file one can upload to an upload session is 350 GB.

Parameters:



21
22
23
24
25
26
# File 'lib/dropbox_api/endpoints/files/upload_session_finish.rb', line 21

add_endpoint :upload_session_finish do |cursor, commit, content = nil|
  perform_request({
    :cursor => cursor.to_hash,
    :commit => commit.to_hash
  }, content)
end