Migrate from s3 sdk v2 to v3 (#6731)

* chore: migrate from s3 sdk v2 to v3

* import signature-v4-crt

* downgrade minor version

* Add s3-presigned-post manually

* Change s3 mock

* Update server/storage/files/S3Storage.ts

* docs

* Upgrade aws-sdk

---------

Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
Nanguan Lin
2024-05-19 21:01:42 +08:00
committed by GitHub
parent cd4f3f9ff2
commit 3a7dd94e14
9 changed files with 1510 additions and 229 deletions

View File

@@ -84,7 +84,7 @@ router.get(
"application/octet-stream"
);
ctx.attachment(fileName);
ctx.body = FileStorage.getFileStream(key);
ctx.body = await FileStorage.getFileStream(key);
} else {
const attachment = await Attachment.findOne({
where: { key },