Class: DropboxApi::Endpoints::Files::Upload

Inherits:
ContentUpload show all
Defined in:
lib/dropbox_api/endpoints/files/upload.rb

Constant Summary collapse

Method =
:post
Path =
"/2/files/upload".freeze
ResultType =
DropboxApi::Metadata::File
ErrorType =
DropboxApi::Errors::UploadError

Instance Method Summary collapse

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(path) ⇒ Object

Create a new file with the contents provided in the request. Do not use this to upload a file larger than 150 MB. Instead, create an upload session with #upload_session_start().

Parameters:

  • path (String)

    Path in the user’s Dropbox to save the file.



22
23
24
# File 'lib/dropbox_api/endpoints/files/upload.rb', line 22

add_endpoint :upload do |path, content, options = {}|
  perform_request({:path => path}, content)
end