feat: add attachment storage bindings and schema

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2026-07-02 07:33:38 -07:00
parent faaa66490b
commit fb7afb69f3
3 changed files with 131 additions and 0 deletions

40
wrangler.jsonc Normal file
View File

@@ -0,0 +1,40 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "cfw-attachment",
"main": "src/index.ts",
"account_id": "67720b647ff2b55cf37ba3ef9e677083",
"compatibility_date": "2026-06-10",
"compatibility_flags": ["nodejs_compat"],
"routes": [
{
"pattern": "cfw-attachment.bowong.cc",
"custom_domain": true
}
],
"observability": {
"enabled": true,
"head_sampling_rate": 0.1
},
"services": [
{
"binding": "AUTH",
"service": "cfw-auth"
}
],
"d1_databases": [
{
"binding": "DB",
"database_name": "cfw-attachment",
"database_id": "f8516e33-2902-423c-9a2d-df9974154cda"
}
],
"r2_buckets": [
{
"binding": "ATTACHMENTS",
"bucket_name": "cfw-attachment"
}
],
"vars": {
"MAX_UPLOAD_BYTES": "52428800"
}
}