Upload file to Google Drive from URL using REST API

Viewed 1189

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.

2 Answers

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.

I think you are unable to use OneDrive's REST API on Google Drive since most such services are self-used only. Yet, i know a third party online app which enables you upload files to most common cloud drives (Google Drive, OneDrive, Dropbox, Mega, etc.) from URL links. What you have to do is to create an account of this web-based app, add your cloud to its platform and import/export files to your cloud through its service. Maybe it can help you.

Related