class BrickFTP::RESTfulAPI::StartUpload
Starting a new upload
@see developers.files.com/#starting-a-new-upload Starting a new upload
Public Instance Methods
call(path)
click to toggle source
The first request to upload a new file is a POST request to /files/PATH_AND_FILENAME.EXT with an action parameter with the value of put.
@param [String] path Full path of the file or folder. Maximum of 550 characters. @return [BrickFTP::Types::Upload] Upload object
# File lib/brick_ftp/restful_api/start_upload.rb, line 21 def call(path) res = client.post("/api/rest/v1/files/#{ERB::Util.url_encode(path)}", action: 'put') BrickFTP::Types::Upload.new(**res.symbolize_keys) end