Socket
Socket
Sign inDemoInstall

rc-g-picker

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rc-g-picker

<!-- Create Readme file for npm package -->


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

React Google Picker

npm version

A React wrapper component for the Google Picker API that lets the user authenitcate and choose a file from Google Drive .

Installation

Install the module

npm install rc-g-picker --save

Usage

import RCGPicker from "rc-g-picker";

<RCGPicker {...props} />;

Props

PropTypeDefaultDescription
clientIdstringnullThe client ID of the application.
developerKeystringnullThe developer key of the application.
scopestringnullThe scope of the application.
onChangefunctionnullThe callback function that is called when the user selects a file.
onAuthFailedfunctionnullThe callback function that is called when the user fails to authenticate.
onAuthFailedfunctionnullThe callback function that is called when the authentication fails
offlinebooleanfalseIf enabled, the onAuthenticate response will include a code and an access token
multiselectbooleanfalseIf enabled, the user can select multiple files.
viewIdstringnullThe view ID of the picker.
mimeTypesstring[]nullThe mimetypes of the files to be choosen
originstringnullThe origin of the picker.
childrennodenullThe children of the component.
buttonTitlestringnullThe title of the button in case no children provided.
querystringnullThe query to be used in the picker.

Note

Please note that the Google Picker API is not available in all countries. For more information, please refer to the Google Picker API documentation.

Please do not forget to add the gapi init code in your app, Example Below:


import { gapi } from "gapi-script";


  gapi.load("client:auth2", () => {
      gapi.client.init({
        clientId:
          "YOUR_CLIENT_ID",
      });
    });

This package is influenced by react-google-picker but extended to support more features and allow code generation.

Keywords

FAQs

Last updated on 25 Oct 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc