mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 18:42:58 +03:00
fix: consume blob stream correctly (#5706)
- use correctly endpoint in r2 - consume blob stream correctly
This commit is contained in:
parent
db3891ba33
commit
fdffe90892
@ -20,7 +20,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/server": "^4.9.5",
|
"@apollo/server": "^4.9.5",
|
||||||
"@auth/prisma-adapter": "^1.0.7",
|
"@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-monitoring-exporter": "^0.17.0",
|
||||||
"@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0",
|
"@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0",
|
||||||
"@google-cloud/opentelemetry-resource-util": "^2.1.0",
|
"@google-cloud/opentelemetry-resource-util": "^2.1.0",
|
||||||
|
@ -10,6 +10,7 @@ export class R2StorageProvider extends S3StorageProvider {
|
|||||||
super(
|
super(
|
||||||
{
|
{
|
||||||
...config,
|
...config,
|
||||||
|
forcePathStyle: true,
|
||||||
endpoint: `https://${config.accountId}.r2.cloudflarestorage.com`,
|
endpoint: `https://${config.accountId}.r2.cloudflarestorage.com`,
|
||||||
},
|
},
|
||||||
bucket
|
bucket
|
||||||
|
@ -49,7 +49,7 @@ export class S3StorageProvider implements StorageProvider {
|
|||||||
new PutObjectCommand({
|
new PutObjectCommand({
|
||||||
Bucket: this.bucket,
|
Bucket: this.bucket,
|
||||||
Key: key,
|
Key: key,
|
||||||
Body: body,
|
Body: blob,
|
||||||
|
|
||||||
// metadata
|
// metadata
|
||||||
ContentType: metadata.contentType,
|
ContentType: metadata.contentType,
|
||||||
|
@ -94,7 +94,7 @@
|
|||||||
"zod": "^3.22.4"
|
"zod": "^3.22.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@aws-sdk/client-s3": "3.485.0",
|
"@aws-sdk/client-s3": "3.499.0",
|
||||||
"@perfsee/webpack": "^1.10.0",
|
"@perfsee/webpack": "^1.10.0",
|
||||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
|
||||||
"@sentry/webpack-plugin": "^2.8.0",
|
"@sentry/webpack-plugin": "^2.8.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user