Class: DropboxApi::Endpoints::Files::UploadSessionAppendV2
- Inherits:
-
ContentUpload
- Object
- Base
- ContentUpload
- DropboxApi::Endpoints::Files::UploadSessionAppendV2
- 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
-
#upload_session_append_v2(cursor, content, options = {}) ⇒ Object
Append more data to an upload session.
Methods included from OptionsValidator
Methods inherited from ContentUpload
#build_request, #initialize, #perform_request
Methods inherited from Base
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.
The maximum size of a file one can upload to an upload session is 350 GB.
Calling this method may update the cursor received. In particular, the
offset variable will be increased to match the new position. This allows
you to make subsequent calls to the endpoint using the same cursor
, as
you can see in the example.
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/dropbox_api/endpoints/files/upload_session_append_v2.rb', line 38 add_endpoint :upload_session_append_v2 do |cursor, content, = {}| ([ :close ], ) perform_request(.merge({ :cursor => cursor.to_hash }), content) cursor.offset += content.bytesize end |