2011-05-10 58 views
2

我在ColdFusion中构建了类似论坛的应用程序,我想添加一项功能,用户可以使用它的Google帐户将文件上传到Google文档,然后其他用户可以编辑这些文件。用coldfusion上传google文档

我一直在使用此CFC:http://cfgoogle.riaforge.org/来检索Google文档,但上传功能目前缺失。我需要首先上传文件的上传功能,然后再编辑它的第二部分。我希望这是有道理的。

这就是我要求的帮助。我不是那种经验丰富的人,我想知道是否有人可以帮我一把。

这是我到目前为止有:

<cffunction name="upload" access="public" returnType="any" hint="I upload the document." output="false"> 
<cfargument name="myFile" type="string" required="true" hint="file to upload."> 

<cfset var result = ""> 
<cfset var service = variables.docservice> 

<cfset theUrl = "https://docs.google.com/feeds/documents/private/full HTTP/1.1"> 

<cfhttp url="#theURL#" method="post" result="result"> 
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#getAuth(service)#"> 
<cfhttpparam type="header" name="Content-Length" value="81047"> 
<cfhttpparam type="header" name="Content-Type" value="application/msword"> 
<cfhttpparam type="header" name="Slug" value="#myFile#"> 
</cfhttp> 

<cfreturn result.filecontent> 

</cffunction> 

,但我得到以下错误,当我把结果输出: “无效请求的URI”

如果有人可以帮助我这一个(即使只是告诉我),这将是主要的赞赏。

回答

相关问题