Add resumable upload for large files to Google Drive

Enhanced the uploadToDrive function to support resumable uploads for files larger than 20MB, improving reliability for large file transfers. Also updated wrangler.jsonc to enable smart placement and cleaned up configuration comments.
This commit is contained in:
xixu-me committed 2025-07-03 22:34:00 +08:00
1 parent 2aa82df6b5
commit 3d4a352f63
2 files changed
+101 -69

No files matched your search

+3 -30
View File
@@ -9,35 +9,8 @@
"name": "gdrive-upload-robot",
"observability": {
"enabled": true
},
"placement": {
"mode": "smart"
}
/**
* Smart Placement
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
*/
// "placement": { "mode": "smart" },
/**
* Bindings
* Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
* databases, object storage, AI inference, real-time communication and more.
* https://developers.cloudflare.com/workers/runtime-apis/bindings/
*/
/**
* Environment Variables
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
*/
// "vars": { "MY_VARIABLE": "production_value" },
/**
* Note: Use secrets to store sensitive data.
* https://developers.cloudflare.com/workers/configuration/secrets/
*/
/**
* Static Assets
* https://developers.cloudflare.com/workers/static-assets/binding/
*/
// "assets": { "directory": "./public/", "binding": "ASSETS" },
/**
* Service Bindings (communicate between multiple Workers)
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
*/
// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
}