fix: Refactor attachment downloads during export to use promises (#5294
* Refactor attachment downloads during export to use promises instead of streams Date attachments in zip file correctly * tsc
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
FileOperationState,
|
||||
FileOperationType,
|
||||
} from "@shared/types";
|
||||
import { deleteFromS3, getFileByKey } from "@server/utils/s3";
|
||||
import { deleteFromS3, getFileStream } from "@server/utils/s3";
|
||||
import Collection from "./Collection";
|
||||
import Team from "./Team";
|
||||
import User from "./User";
|
||||
@@ -77,7 +77,7 @@ class FileOperation extends IdModel {
|
||||
* The file operation contents as a readable stream.
|
||||
*/
|
||||
get stream() {
|
||||
return getFileByKey(this.key);
|
||||
return getFileStream(this.key);
|
||||
}
|
||||
|
||||
// hooks
|
||||
|
||||
Reference in New Issue
Block a user