Class: DropboxApi::Endpoints::Files::UploadSessionAppendV2

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

Constant Summary collapse

Method =
:post
Path =
"/2/files/upload_session/append_v2".freeze
ResultType =
DropboxApi::Results::VoidResult
ErrorType =
DropboxApi::Errors::UploadSessionLookupError

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_append_v2(cursor, content, options = {}) ⇒ Object

Append more data to an upload session.

When the parameter close is set, this call will close the session.

A single request should not upload more than 150 MB of file contents.

Parameters:

Options Hash (options):

  • close (Boolean)

    If true, the current session will be closed, at which point you won’t be able to call Client#upload_session_append_v2 anymore with the current session. The default for this field is false.

See Also:

  • UploadSessionCursor


23
24
25
26
27
28
29
30
31
# File 'lib/dropbox_api/endpoints/files/upload_session_append_v2.rb', line 23

add_endpoint :upload_session_append_v2 do |cursor, content, options = {}|
  validate_options([
    :close
  ], options)

  perform_request(options.merge({
    :cursor => cursor.to_hash
  }), content)
end