![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
drive-uploady
Advanced tools
Provides a custom React Uploady for uploading to Google Drive. All Uploady functionality such as hooks and components (ex: Upload-Preview) can be used with this package.
Uploads are sent to the multipart endpoint: Google Drive docs.
Note: no support for URL based uploads, only files.
#Yarn:
$ yarn add drive-uploady
#NPM:
$ npm i drive-uploady
Name (* = mandatory) | Type | Default | Description |
---|---|---|---|
clientId* (unless gapi instance provided) | string | The API client Id. Obtained from the Google dev console | |
scopes* (unless gapi instance provided) | string | The scopes your app requires (Drive docs) | |
gApiScriptId | string | "uploady-drive-api" | The id of the script tag (loading google api) that will be added to the page |
gapi | provide the Google API instance directly to be used | ||
queryParams | Object | Optional query parameters |
All other Uploady props can be passed as well. See docs here.
Note: no support for concurrent > 1
import React from "react";
import DriveUploady from "drive-uploady";
import UploadButton from "@rpldy/upload-button";
export const App = () => {
return <DriveUploady
clientId="<my-client-id>"
scope="https://www.googleapis.com/auth/drive.file"
>
<h2>Drive Uploady</h2>
<UploadButton>Upload to Drive</UploadButton>
</DriveUploady>;
};
import React from "react";
import DriveUploady from "drive-uploady";
import UploadButton from "@rpldy/upload-button";
export const App = () => {
return <DriveUploady
clientId="<my-client-id>"
scope="https://www.googleapis.com/auth/drive.file"
params={{ parents: ["folder-id"] }}
>
<h2>Drive Uploady</h2>
<UploadButton>Upload to Drive</UploadButton>
</DriveUploady>;
};
Drive-Uploady will try and use an existing window.gapi
instance if its available.
If not, it will create a new one (by adding a script tag).
In case you already have a GAPI client running in your page/app that's not available on the window, you can pass it as a prop:
import React from "react";
import DriveUploady from "drive-uploady";
import UploadButton from "@rpldy/upload-button";
export const App = () => {
return <DriveUploady
clientId="<my-client-id>"
scope="https://www.googleapis.com/auth/drive.file"
gapi={window.parent.gapi}
>
<h2>Drive Uploady</h2>
<UploadButton>Upload to Drive</UploadButton>
</DriveUploady>;
};
FAQs
wrapper for react-uploady to upload to google-drive
We found that drive-uploady demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.