English 中文(简体)
How to authorize to download PDF document from content got from google-documents list-api
原标题:

I have list of google docs which i got by authorizing myself with below code:

<cfhttp url="https://www.google.com/accounts/ClientLogin" method="post" result="result" charset="utf-8">
        <cfhttpparam type="formfield" name="accountType" value="HOSTED_OR_GOOGLE">
        <cfhttpparam type="formfield" name="Email" value="abc@gmail.com">
        <cfhttpparam type="formfield" name="Passwd" value="xyz">
        <cfhttpparam type="formfield" name="service" value="writely">
        <cfhttpparam type="formfield" name="source" value="abc-xyz-2010">
    </cfhttp>

Now I am able to download word documents and PPT by the help of content.xmlAttribute from the xml file having all documents. But I am not able to download PDF files. Error message I am getting is "Authorization require error 401".I checked documentation it say that: It is also not possible to manually contruct the download URL for these types of files. Instead, send an authenticated HTTP GET to the entry s src link:

<content type="text/html" src="https://doc-04-20-docs.googleusercontent.com/docs/secure/m7an0emtau/WJm.../YzI2Y2ExYWVm?h=16655626&e=download&gd=true"/>

Can someone please tell me how to pass authorization information and get the PDF download link working. Thanks a lot in advance!!

问题回答

Replace method="post" with method="get" ?





相关问题
JQuery AJAX .load - flash chart doesnt load in IE

An IE issue has me completely stumped. I have a coldfusion page that uses JQuery s AJAX .load function to load in a new flash file that is generated by coldFusion s cfchart tag. This works completely ...

Best Coldfusion Library for OpenID [closed]

I am getting ready to start a project that requires using OpenID within Coldfusion 8. I have found a number of different options and was wondering what has worked the best, get s the most support, ...

Find ColdFusion Generated ID

Is there a way to find the elements generated by ColdFusion s <CFLayout> and <CFLayoutArea> tags? These tags: <cflayout type="tab" name="MyAccount"> <cflayoutarea name="...

ColdFusion COM error

I am upgrading from CF4.5 to CF8. Calls to COM dll s that used to work in version 4.5 now throw a "Complex object types cannot be converted to simple values.." error. The COM object has a few arrays ...

What s the best way to write engine-specific CFML code?

Sometimes it is necessary to write different code for Adobe ColdFusion vs Railo vs OpenBD, due to differences in implementation. Do people have a specific method that they use for this? For example, ...

热门标签