Sha256: cb00266a90cc34bc8dcb14b91e7cb516d7254043c4b34d92d7260d2cabc610d9

Contents?: true

Size: 1.01 KB

Versions: 8

Compression:

Stored size: 1.01 KB

Contents

module DropboxApi::Endpoints::Files
  class UploadSessionFinish < DropboxApi::Endpoints::ContentUpload
    Method      = :post
    Path        = "/2/files/upload_session/finish".freeze
    ResultType  = DropboxApi::Metadata::File
    ErrorType   = DropboxApi::Errors::UploadSessionFinishError

    include DropboxApi::OptionsValidator

    # 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.
    #
    # @param cursor [DropboxApi::Metadata::UploadSessionCursor] Contains the
    #   upload session ID and the offset.
    # @param commit [DropboxApi::Metadata::CommitInfo] Contains the path and
    #   other optional modifiers for the commit.
    add_endpoint :upload_session_finish do |cursor, commit, content = nil|
      perform_request({
        :cursor => cursor.to_hash,
        :commit => commit.to_hash
      }, content)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dropbox_api-0.1.18 lib/dropbox_api/endpoints/files/upload_session_finish.rb
dropbox_api-0.1.17 lib/dropbox_api/endpoints/files/upload_session_finish.rb
dropbox_api-0.1.16 lib/dropbox_api/endpoints/files/upload_session_finish.rb
dropbox_api-0.1.15 lib/dropbox_api/endpoints/files/upload_session_finish.rb
dropbox_api-0.1.14 lib/dropbox_api/endpoints/files/upload_session_finish.rb
dropbox_api-0.1.13 lib/dropbox_api/endpoints/files/upload_session_finish.rb
dropbox_api-0.1.12 lib/dropbox_api/endpoints/files/upload_session_finish.rb
dropbox_api-0.1.11 lib/dropbox_api/endpoints/files/upload_session_finish.rb