diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-05-13 20:12:06 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-05-13 20:12:06 +0000 |
commit | f8830ba4d8827a9460de51e17ccd8caeed7217e2 (patch) | |
tree | c1c15b0590c89eff2644b1618982860634c497df /plugins/Dropbox/src/api/upload.h | |
parent | 5865e7f3b1013d8540e8bd5a8a012da26d6f6768 (diff) |
Dropbox: some fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@13577 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/api/upload.h')
-rw-r--r-- | plugins/Dropbox/src/api/upload.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Dropbox/src/api/upload.h b/plugins/Dropbox/src/api/upload.h index 5c2e41c792..a871940e20 100644 --- a/plugins/Dropbox/src/api/upload.h +++ b/plugins/Dropbox/src/api/upload.h @@ -4,8 +4,8 @@ class UploadFileRequest : public HttpRequest
{
public:
- UploadFileRequest(const char *token, const char *fileName, const char *data, int length) :
- HttpRequest(REQUEST_PUT, FORMAT, DROPBOX_APICONTENT_URL "/files_put/auto/%s", fileName)
+ UploadFileRequest(const char *token, const char *fileName, const char *data, int length, const char *root = "auto") :
+ HttpRequest(REQUEST_PUT, FORMAT, DROPBOX_APICONTENT_URL "/files_put/%s/%s", root, fileName)
{
AddBearerAuthHeader(token);
pData = (char*)data;
@@ -34,8 +34,8 @@ public: dataLength = length;
}
- UploadFileChunkRequest(const char *token, const char *uploadId, const char *path) :
- HttpRequest(REQUEST_POST, FORMAT, DROPBOX_APICONTENT_URL "/commit_chunked_upload/auto/%s", path)
+ UploadFileChunkRequest(const char *token, const char *uploadId, const char *path, const char *root = "auto") :
+ HttpRequest(REQUEST_POST, FORMAT, DROPBOX_APICONTENT_URL "/commit_chunked_upload/%s/%s", root, path)
{
AddBearerAuthHeader(token);
AddHeader("Content-Type", "application/x-www-form-urlencoded");
|