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

Updating Google Drive Picker View. #50

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gautamtata
Copy link

The backend supports PDFs (https://github.com/psychic-api/psychic/blob/main/server/connectors/google_drive_connector/google_drive_connector.py). Docx can be exported from Google API into PDF as well.

The current view, "DOCS" allows users to select any files that are MIME-types supported by Gdrive -- Could be Drawings, SpreadSheets, iPynb etc. Even if the handling for random files is fine on the backend, the users would probably expect the files they selected to be successfully uploaded. Better to handle "DOCUMENTS" (Google Drive Documents -- google docs)
or "PDFS" view to show exclusively the kind of docs we can process for now.

Also, should be fairly straightforward to support Most types from Google Drive (Sheets, Docx, PDFs) mainly using Unstructured loader // Random files with textual data can also be read using UnstructuredFileLoader.

Adding a different view. The backend doesn't support all MIME-types that google drive view -- DOCS contains like Drawings, Ipynb basically any file.
@vercel
Copy link

vercel bot commented Jun 23, 2023

@gautamtata is attempting to deploy a commit to the Sidekick-ai Team on Vercel.

A member of the Team first needs to authorize it.

@Ayan-Bandyopadhyay
Copy link
Contributor

So given that the picker doesn't allow us to select both google docs and pdfs, what I'm going to do is make it toggle-able through the dashboard. It's going to be a bit more involved so I'll go ahead and make that change myself.

@gautamtata
Copy link
Author

There seems to be a way to have custom views. React-google-drive picker has a customViews prop which seems to support having different views in an Array.

https://github.com/Jose-cd/React-google-drive-picker#picker-props

@Ayan-Bandyopadhyay
Copy link
Contributor

Nice yea just pushed a fix. customViews didn't work for me but viewMimeTypes did.

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

Successfully merging this pull request may close these issues.

None yet

2 participants