将Google云端硬盘中的文件复制到我自己的服务器上

将Google云端硬盘中的文件复制到我自己的服务器上

本文介绍了将Google云端硬盘中的文件复制到我自己的服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您还记得,我正在尝试将Google Drive集成到我们的网站中,该网站建立在Elgg上。 Elgg已经有了它的本地文件管理系统。



我们想要做的就是将文件从云端硬盘复制到我们的服务器,文件。问题是,我没有看到文件元数据中的任何URL,指示文件实际存储的位置。



我可以在Google Drive SDK中看到复制功能,但是我不要以为它允许将文件复制到我们自己的服务器上。



谢谢你。

如果您试图保存内容存储在驱动器中的文件(例如图像,pdf等),则文件的元数据应该包含 downloadUrl ,可用于通过授权 GET 请求检索文件内容。



对于Google文档(Google文档,Google电子表格等),数据以专用格式存储,第三方应用程序无法理解。在这种情况下,您的应用程序必须使用公开的 exportLinks 之一将文档导出为您的应用程序可理解的格式。


If you remember, I'm trying to integrate Google Drive within our website, which is built on Elgg. Elgg already has its native file management system.

What we would like to do is to copy a file from Drive to our server, you know, kind of : Send to My Files. The problem is that I don't see any URL in the file metadata indicating where the file is physically stored.

I can see the copy function in Google Drive SDK but I don't think it allows to copy the file on our own server. Unless I've read it wrong.

Can you help me?

Thanks you.

解决方案

If you are trying to save a file that has content stored in drive (e.g an image, pdf, etc.), the file's metadata should contain a downloadUrl that can be used to retrieve the file's content through an authorized GET request.

For Google Documents (Google Docs, Google Spreadsheets, etc.), the data is stored in a private format that cannot be understand by third party applications. In this case, your app will have to use one of the exposed exportLinks to export the document into a format understood by your application.

这篇关于将Google云端硬盘中的文件复制到我自己的服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 22:55