private function BackupMigrateDropboxAPI::_file_upload_upload in Backup and Migrate Dropbox 7.2
Same name and namespace in other branches
- 7.3 backup_migrate_dropbox.dropbox_api.inc \BackupMigrateDropboxAPI::_file_upload_upload()
- 7 backup_migrate_dropbox.dropbox_api.inc \BackupMigrateDropboxAPI::_file_upload_upload()
Uploads the $contents of a file (with 1 request) to the indicated $path.
{@link https://www.dropbox.com/developers/documentation/http/documentation#file... Dropbox API /upload}
Parameters
string $path:
string $content:
Return value
object The json decoded response.
Throws
\RuntimeException
1 call to BackupMigrateDropboxAPI::_file_upload_upload()
- BackupMigrateDropboxAPI::file_upload in ./
backup_migrate_dropbox.dropbox_api.inc - Uploads a file to the given path.
File
- ./
backup_migrate_dropbox.dropbox_api.inc, line 255 - backup_migrate_dropbox.api.inc
Class
- BackupMigrateDropboxAPI
- @file backup_migrate_dropbox.api.inc
Code
private function _file_upload_upload($path, $content) {
// Simple upload.
$parameters = array(
'path' => $path,
'mode' => 'add',
'autorename' => TRUE,
'mute' => FALSE,
);
return $this
->sendMessage('content', 'files/upload', $parameters, $content);
}