From 9153b50b7815e27043cf4dedd6968c7901157cdf Mon Sep 17 00:00:00 2001 From: aunsane Date: Thu, 9 Mar 2017 23:41:08 +0300 Subject: Dropbox: chaged method that shares links: now it generates temporary direct linc to a file --- plugins/Dropbox/src/dropbox_transfers.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/Dropbox/src/dropbox_transfers.cpp') diff --git a/plugins/Dropbox/src/dropbox_transfers.cpp b/plugins/Dropbox/src/dropbox_transfers.cpp index 85f3d44592..556bccbcfc 100644 --- a/plugins/Dropbox/src/dropbox_transfers.cpp +++ b/plugins/Dropbox/src/dropbox_transfers.cpp @@ -76,8 +76,7 @@ void CDropbox::CreateFolder(const char *path) void CDropbox::CreateDownloadUrl(const char *path, char *url) { ptrA token(db_get_sa(NULL, MODULE, "TokenSecret")); - //bool useShortUrl = db_get_b(NULL, MODULE, "UseSortLinks", 1) > 0; - ShareRequest request(token, path); + GetTemporaryLinkRequest request(token, path); NLHR_PTR response(request.Send(hNetlibConnection)); HandleJsonResponseError(response); @@ -86,7 +85,7 @@ void CDropbox::CreateDownloadUrl(const char *path, char *url) if (root.empty()) return; - JSONNode node = root.at("url"); + JSONNode node = root.at("link"); mir_strcpy(url, node.as_string().c_str()); } -- cgit v1.2.3