I'm trying to use the libcurl in a C/C++ application to post files to DropBox.
我正在尝试在C / C ++应用程序中使用libcurl将文件发布到DropBox。
I would like to use the "/files (POST)" API as documented here...
我想使用这里记录的“/ files(POST)”API ...
https://www.dropbox.com/developers/reference/api#files-POST
I am having problems with properly authenticating (OAuth) this call. It is unclear to me how to properly create the authentication signature.
我在正确验证(OAuth)此调用时遇到问题。我不清楚如何正确创建身份验证签名。
From some a sample I saw, it looked like they were reading in the whole file to create the HMAC-SHA1 encoding on. This seems problematic on large files.
从我看到的一些示例中,看起来他们正在读取整个文件以创建HMAC-SHA1编码。这对大文件似乎有问题。
Does anyone have experience or insight using this API or something similar?
有没有人有使用此API或类似的经验或见解?
2 个解决方案
#1
1
I have just use the libouth and libcurl to get information from sina weibo. here is my example for you refer. you can also refer the liboauth test programmer in the tests dir, oauthtest.c
我只是使用libouth和libcurl从新浪微博获取信息。这是我推荐的例子。你也可以在测试目录dauthtest.c中找到liboauth测试程序员
if (use_post)
{
req_url = oauth_sign_url2(test_call_uri, &postarg, OA_HMAC, NULL, c_key, c_secret, t_key, t_secret);
reply = oauth_http_post(req_url,postarg);
}
#2
0
I suggest using BOOST ASIO . Makes uploading and downloading a breeze.
我建议使用BOOST ASIO。使上传和下载变得轻而易举。
#1
1
I have just use the libouth and libcurl to get information from sina weibo. here is my example for you refer. you can also refer the liboauth test programmer in the tests dir, oauthtest.c
我只是使用libouth和libcurl从新浪微博获取信息。这是我推荐的例子。你也可以在测试目录dauthtest.c中找到liboauth测试程序员
if (use_post)
{
req_url = oauth_sign_url2(test_call_uri, &postarg, OA_HMAC, NULL, c_key, c_secret, t_key, t_secret);
reply = oauth_http_post(req_url,postarg);
}
#2
0
I suggest using BOOST ASIO . Makes uploading and downloading a breeze.
我建议使用BOOST ASIO。使上传和下载变得轻而易举。