drive-url

Generate a Google Drive direct download link based on the URL or ID.

Usage no npm install needed!

<script type="module">
  import driveUrl from 'https://cdn.skypack.dev/drive-url';
</script>

README

Drive URL Travis CI Build Status

Generate a Google Drive direct download link based on the URL or ID.

NPM Badge

Install

npm install drive-url

Usage

const driveURL = require("drive-url");

driveURL("https://drive.google.com/file/d/1Px8bePd7pFSz5r6bTA7GKN9HloCzMfFk/view?usp=sharing");
//=> 'https://drive.google.com/uc?export=download&id=1Px8bePd7pFSz5r6bTA7GKN9HloCzMfFk'

API

driveURL(url, apiKey?)

url

Type: string

The url or id of the drive content.

apiKey

Type: string

A drive api key that can be used to exceed the download limit of 100MB.