https://github.com/richienb/drive-url
Generate a Google Drive direct download link based on the URL or ID.
https://github.com/richienb/drive-url
Last synced: 9 months ago
JSON representation
Generate a Google Drive direct download link based on the URL or ID.
- Host: GitHub
- URL: https://github.com/richienb/drive-url
- Owner: Richienb
- License: mit
- Created: 2020-02-04T07:06:08.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-10-17T21:57:21.000Z (about 2 years ago)
- Last Synced: 2025-03-29T20:51:08.205Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 101 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# drive-url
Generate a Google Drive direct download link based on the URL or ID.
## Install
```sh
npm install drive-url
```
## Usage
```js
import driveUrl from 'drive-url';
driveUrl('https://drive.google.com/file/d/1Px8bePd7pFSz5r6bTA7GKN9HloCzMfFk/view?usp=sharing');
//=> 'https://drive.google.com/uc?export=download&id=1Px8bePd7pFSz5r6bTA7GKN9HloCzMfFk'
```
## API
### driveURL(urlOrId, apiKey?)
#### urlOrId
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.