feat: add Google Drive storage adapter (#50)

* Initial plan

* Add Google Drive storage adapter implementation

Co-authored-by: DrizzleTime <169802108+DrizzleTime@users.noreply.github.com>

* Add optional methods for direct download and thumbnail support

Co-authored-by: DrizzleTime <169802108+DrizzleTime@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DrizzleTime <169802108+DrizzleTime@users.noreply.github.com>
This commit is contained in:
Copilot
2025-11-20 11:49:32 +08:00
committed by GitHub
parent 8ef0a34642
commit 219f3e81b8
2 changed files with 567 additions and 1 deletions

View File

@@ -77,11 +77,17 @@ async def list_adapters(
async def available_adapter_types(
current_user: Annotated[User, Depends(get_current_active_user)]
):
name_map = {
"local": "本地文件系统",
"webdav": "WebDAV",
"GoogleDrive": "Google Drive",
"OneDrive": "OneDrive",
}
data = []
for t, fields in get_config_schemas().items():
data.append({
"type": t,
"name": "本地文件系统" if t == "local" else ("WebDAV" if t == "webdav" else t),
"name": name_map.get(t, t),
"config_schema": fields,
})
return success(data)