papermark icon indicating copy to clipboard operation
papermark copied to clipboard

feat: google drive picker integration

Open yashsharma999 opened this issue 1 year ago • 5 comments

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 avatar Sep 08 '24 17:09 yashsharma999

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

A member of the Team first needs to authorize it.

vercel[bot] avatar Sep 08 '24 17:09 vercel[bot]

@yashsharma999 That looks incredible 😍

Let me review and merge it in

mfts avatar Sep 10 '24 08:09 mfts

/award 750

mfts avatar Oct 31 '24 03:10 mfts

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

oss-gg[bot] avatar Oct 31 '24 03:10 oss-gg[bot]

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.

yashsharma999 avatar Nov 03 '24 05:11 yashsharma999