使用的libcurl将文件上传到DropBox的 [英] Using libcurl to upload files to DropBox

查看:189
本文介绍了使用的libcurl将文件上传到DropBox的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用libcurl的一个C / C ++应用程序文件发布到DropBox的。

I'm trying to use the libcurl in a C/C++ application to post files to DropBox.

我想用/文件(POST)API作为记录在这里...

I would like to use the "/files (POST)" API as documented here...

<一个href=\"https://www.dropbox.com/developers/reference/api#files-POST\">https://www.dropbox.com/developers/reference/api#files-POST

我有正确的身份验证(OAuth的)这一呼吁的问题。这是我不清楚如何正确地创建身份验证签名。

I am having problems with properly authenticating (OAuth) this call. It is unclear to me how to properly create the authentication signature.

从一些样本,我看到,它看上去就像他们在整个文件中读取创建HMAC-SHA1编码上。这似乎对大文件的问题。

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.

有没有人有使用此API或类似的东西的经验或见解?

Does anyone have experience or insight using this API or something similar?

推荐答案

我刚才用libouth和libcurl的获得来自新浪微博的信息。这里是我的例子给你参考。也可以指在测试中dir中liboauth测试程序员,oauthtest.c

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

    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);
    } 

这篇关于使用的libcurl将文件上传到DropBox的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆