Class: DropboxApi::Endpoints::Files::Upload
- Inherits:
-
ContentUpload
- Object
- Base
- ContentUpload
- DropboxApi::Endpoints::Files::Upload
- 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
-
#upload(path) ⇒ Object
Create a new file with the contents provided in the request.
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(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().
22 23 24 |
# File 'lib/dropbox_api/endpoints/files/upload.rb', line 22 add_endpoint :upload do |path, content, = {}| perform_request({:path => path}, content) end |