mirror of
https://github.com/open-webui/oikb.git
synced 2026-11-05 01:27:25 +00:00
[PR #72] [MERGED] fix: support Google Shared Drives in gdrive connector #98
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/oikb#98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/oikb/pull/72
Author: @joelchrist
Created: 7/1/2026
Status: ✅ Merged
Merged: 7/17/2026
Merged by: @tjbck
Base:
main← Head:fix/gdrive-shared-drives📝 Commits (1)
e4ceaaffix: support Google Shared Drives in gdrive connector📊 Changes
2 files changed (+27 additions, -3 deletions)
View changed files
📝
CHANGELOG.md(+6 -0)📝
src/oikb/connectors/gdrive.py(+21 -3)📄 Description
Summary
Fixes #52 — the
gdriveconnector reported "nothing to do" when the target folder lives inside a Google Shared Drive (formerly Team Drive), even with correct service-account permissions.The Drive API's
files.listdoes not return items from Shared Drives unless the request opts in withsupportsAllDrives=TrueandincludeItemsFromAllDrives=True. Personal "My Drive" folders work because they don't require these flags — which is why the connector worked in that case but silently returned an empty listing for Shared Drives.Changes
src/oikb/connectors/gdrive.py:supportsAllDrives=TrueandincludeItemsFromAllDrives=Trueto allfiles.listcalls — one in_walk_folder()and both in_find_file().supportsAllDrives=Truetofiles.getandfiles.get_mediainread_file()so Shared Drive files can be downloaded. (files.exportaccepts onlyfileId/mimeTypeand works by ID, so it is left unchanged.)The flags are a no-op for My Drive folders, so existing behaviour is unchanged.
Testing
python -m py_compile src/oikb/connectors/gdrive.pypasses.oikb diff gdrive:<shared-drive-folder-id> --kb-id <kb>now lists files instead of reporting "nothing to do".🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.