Compare commits

...

2 Commits

Author SHA1 Message Date
李华桥
e881c2860d chore: yarn dedupe 2024-01-26 19:52:44 +08:00
DarkSky
4028fd2a29 fix: consume blob stream correctly (#5706)
- use correctly endpoint in r2
- consume blob stream correctly
2024-01-26 16:42:18 +08:00
5 changed files with 855 additions and 811 deletions

View File

@@ -20,7 +20,7 @@
"dependencies": {
"@apollo/server": "^4.9.5",
"@auth/prisma-adapter": "^1.0.7",
"@aws-sdk/client-s3": "^3.454.0",
"@aws-sdk/client-s3": "^3.499.0",
"@google-cloud/opentelemetry-cloud-monitoring-exporter": "^0.17.0",
"@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0",
"@keyv/redis": "^2.8.0",

View File

@@ -10,6 +10,7 @@ export class R2StorageProvider extends S3StorageProvider {
super(
{
...config,
forcePathStyle: true,
endpoint: `https://${config.accountId}.r2.cloudflarestorage.com`,
},
bucket

View File

@@ -49,7 +49,7 @@ export class S3StorageProvider implements StorageProvider {
new PutObjectCommand({
Bucket: this.bucket,
Key: key,
Body: body,
Body: blob,
// metadata
ContentType: metadata.contentType,

View File

@@ -94,8 +94,8 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@aws-sdk/client-s3": "3.485.0",
"@perfsee/webpack": "^1.8.4",
"@aws-sdk/client-s3": "3.499.0",
"@perfsee/webpack": "^1.10.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
"@sentry/webpack-plugin": "^2.8.0",
"@swc/core": "^1.3.93",

1657
yarn.lock

File diff suppressed because it is too large Load Diff