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 #12715
feat: Google Drive Picker #12715
Conversation
@barredterra you can update your branch to avoid "indentation error" by sider. |
Some of the failing tests are fixed with #12887 |
@surajshetty3416 , @Alchez I'd appreciate your review, if you have any time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Hi @barredterra, Tried testing the above mentioned PR but after I click on the google drive option, it redirects me to the same page rather than taking me to the google drive of the logged in user. Please refer the attached recording for the same: Screen.Recording.2021-07-06.at.11.49.39.AM.mov |
@Komal-Saraf0609 thanks for reviewing. Are you sure that your Google Settings are correct (see docs)? |
@revant, @Komal-Saraf0609 as long as this is not a Google-approved public app, every company will require their own credentials that are only valid internally. This is a restriction by google that we will have to live with. Therefore we cannot all test on the same site / with the same credentials. Everyone will need to create and set their own. |
I tried my credentials and everything works as expected. Added a new note and attached a file https://gh-imp-2021-00192.castlecraft.co.in/app/note/cool%20new%20note Remember to add on google end
|
Hi, Everything is working as expected for me as well. It wasnt working because I didnt enable Google Picker API, after enabling it and adding it, everything started working as expected. |
@Mergifyio backport version-13-hotfix |
✅ Backports have been created
|
…-12715 feat: Google Drive Picker (backport #12715)
This works following instructions. However, atm it does not support Shared Drives; which we use exclusively. With APIv3 |
@sabgaby looks like it's possible to enable shared drives for the Google Drive Picker. Would you like to sponsor this feature? |
@barredterra: sorry for the late reply 🙈 . We could consider sponsoring this feature. However, I don't know how that process works. Who does the coding? and how much does it cost? Guidance is appreciated! |
@sabgaby feel free to reach out to ALYF (my company), Frappe Technologies or any other service provider / freelancer for a quote. |
User can select files from Google Drive, using Google Picker. The Google Drive icon is only shown if the Google integration is enabled. The behavior in the background is like attaching a URL.
If it's the first time, the user needs to sign into google and / or authorize frappe to access it. The access token is saved in
frappe.boot.user.google_drive_token
so this can be skipped most of the time. Also google remembers the authorization and will skip the authorization page in the future.Frappe's FileUploader is closed and instead the Google Picker appears. The user can click on a file and confirm with "Select":
The selected file is added as an attachment to the doc:
Google Settings:
Todo:
If you find this useful, you're most welcome to contribute code or money to this feature.
Picker docs: https://developers.google.com/picker/docs
Docs: frappe/frappe_docs#109