【发布时间】:2013-09-12 01:01:43
【问题描述】:
我正在尝试将文件上传到谷歌驱动器。 作为
token_res = Rho::AsyncHttp.post(
:url => "https://www.googleapis.com/upload/drive/v2/files?uploadType=media",
:headers => {'Content-Type'=> 'image/jpg','Content-Transfer-Encoding'=> 'base64', 'Authorization'=> tokn_final ,'X-JavaScript-User-Agent'=>' Google API 资源管理器'},
:body => image_path
)
上传了一个文件,如果我在正文中给出字符串:body=> 'some string...' 但是如果我在正文中给出 image_path,它不会上传文件,它只会将文件的路径作为字符串上传。
我不知道如何上传文件,请帮我上传。
【问题讨论】:
标签: javascript google-drive-api rhomobile