mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
fix: consume blob stream correctly (#5706)
- use correctly endpoint in r2 - consume blob stream correctly
This commit is contained in:
@@ -10,6 +10,7 @@ export class R2StorageProvider extends S3StorageProvider {
|
||||
super(
|
||||
{
|
||||
...config,
|
||||
forcePathStyle: true,
|
||||
endpoint: `https://${config.accountId}.r2.cloudflarestorage.com`,
|
||||
},
|
||||
bucket
|
||||
|
||||
@@ -49,7 +49,7 @@ export class S3StorageProvider implements StorageProvider {
|
||||
new PutObjectCommand({
|
||||
Bucket: this.bucket,
|
||||
Key: key,
|
||||
Body: body,
|
||||
Body: blob,
|
||||
|
||||
// metadata
|
||||
ContentType: metadata.contentType,
|
||||
|
||||
Reference in New Issue
Block a user