Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: google drive picker integration #590

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yashsharma999
Copy link
Contributor

Users can select files from Google Drive, using Google Picker. The Google Drive icon is shown in the document upload dialog itself.

Screenshot 2024-09-08 at 10 25 09 PM

User has to authenticate when importing from drive.

Screenshot 2024-09-08 at 10 31 08 PM

Once authenticated, Google Drive Picker appears

Screenshot 2024-09-08 at 10 39 45 PM

On selecting a file we get the file id which is then used to download and upload to the Document Upload component itself using Google Drive API

Screenshot 2024-09-08 at 10 59 15 PM

Google Drive API Docs: https://developers.google.com/drive/api/guides/manage-downloads
Google Drive Picker Docs: https://developers.google.com/drive/picker/guides/overview

Key Points

  • Need to enable Drive API in Google Cloud project
  • NEXT_PUBLIC_GOOGLE_APP_ID, NEXT_PUBLIC_GOOGLE_API_KEY will be required
  • Need to rename GOOGLE_CLIENT_ID env variable to NEXT_PUBLIC_GOOGLE_CLIENT_ID, to be used for building Picker on the client side

@yashsharma999 yashsharma999 requested a review from mfts as a code owner September 8, 2024 17:32
Copy link

vercel bot commented Sep 8, 2024

@yashsharma999 is attempting to deploy a commit to the mftsio Team on Vercel.

A member of the Team first needs to authorize it.

@mfts
Copy link
Owner

mfts commented Sep 10, 2024

@yashsharma999 That looks incredible 😍

Let me review and merge it in

@mfts
Copy link
Owner

mfts commented Oct 31, 2024

/award 750

Copy link

oss-gg bot commented Oct 31, 2024

Awarding yashsharma999: 750 points 🕹️ Well done! Check out your new contribution on oss.gg/yashsharma999

@yashsharma999
Copy link
Contributor Author

Hey @mfts, can you review #600 before this one. I'll update this PR accordingly, both have similar changes but in #600 I added multiple file upload support as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants