问题描述
可以使用OneDrive的REST API上传从URL文件作为记录。此API接受我们提供的网址,并将文件从网址上传到预定的目的地。
我一直在为Google云端硬盘寻找类似的REST API或库,但我还找不到它。请指导我如何实现这一目标。我已经设置了oAuth并能够接收access_token和refresh_token。从URL上传文件是该项目中的一项重要功能。
该项目在Heroku中托管,因此我无法将该文件下载到临时文件并上传该文件。它是一个NodeJS项目。
我也在寻找这个解决方案。然而,我从其他博客和文章中了解到,您必须从服务器上提供的URL下载文件,然后将其上传到Google Drive。
截至目前,我明白这个。如果我能够做到这一点,将更新此。
It is possible to upload a file from a URL using OneDrive's REST API as documented here. This API accepts the URL we provide and uploads the file from the URL to the intended destination.
I have been trying to find a similar REST API or library for Google Drive, but I couldn't find it yet. Kindly direct me on how to achieve this. I have already set up oAuth and am able to receive access_token and refresh_token. Uploading files from URL is an important functionality in this project.
The project is hosted in Heroku, so I can't download the file to a temporary file and upload that file. It is a NodeJS project.
I'm also looking for this solution. however, what I understand from other blog and articles is you have to download File from provided URL on your server then upload it to google drive.
As of now, i understand this. Will update this if I able to do this.
这篇关于使用REST API从URL上传文件到Google Drive的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!