如何使用C ++程序将图像上载到Google云端硬盘 [英] How Do I Upload An Image To Google Drive Using A C++ Program

查看:177
本文介绍了如何使用C ++程序将图像上载到Google云端硬盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!我的目标是使用C ++程序将图像上传到Google驱动器。现在,我没有太多的想法,因为我从来没有做过这样的事情。我正在研究要上传的谷歌API,我有点困惑。所以,google API说要在google驱动器中上传图片,我只需要执行以下操作 -



POST / upload / drive / v2 / files? uploadType = media HTTP / 1.1

主持人:www.googleapis.com

内容类型:image / jpeg

内容长度:number_of_bytes_in_file

授权:bearer your_auth_token



现在,我如何在c ++中实现这一点。我的意思是我需要包括哪种类型的库?我真的没有任何线索。任何链接或建议都可以帮助我很多。谢谢。

Hi, everyone! My goal is to upload an image into google drive using a C++ program. Now, i dont have much idea about doing it as i have never done anything like that before. I was studying the google API to upload and i am a little confused. So, the google API says that to upload an image in the google drive, I have to simply do the following-

POST /upload/drive/v2/files?uploadType=media HTTP/1.1
Host: www.googleapis.com
Content-Type: image/jpeg
Content-Length: number_of_bytes_in_file
Authorization: Bearer your_auth_token

Now, how do i implement this in c++. I mean what sort of libraries do i need to include? I really dont have any clue. Any links or suggestions can help me a lot. Thanks.

推荐答案

一些开源产品为Google drive SDK提供C / C ++包装。例如:

https://github.com/jcline/fuse-google-drive [ ^ ],

http://code.google.com/p/qt-google-drive [ ^ ]。



-SA
Some open-source products provide C/C++ wrappers for Google drive SDK. For example:
https://github.com/jcline/fuse-google-drive[^],
http://code.google.com/p/qt-google-drive[^].

—SA


这篇关于如何使用C ++程序将图像上载到Google云端硬盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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