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'
ResultType =
DropboxApi::Metadata::File
ErrorType =
DropboxApi::Errors::UploadSessionFinishError

Instance Method Summary collapse

Methods included from OptionsValidator

#validate_options

Methods inherited from ContentUpload

#build_connection, #build_request, #perform_request

Methods inherited from Base

add_endpoint, #initialize

Constructor Details

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

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:



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

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