fix response pipe, remove multipart

This commit is contained in:
undefined committed 2020-08-20 17:29:46 +08:00
1 parent 65a50275b1
commit af9a8fb206
13 files changed
+70 -46

No files matched your search

+2 -2
View File
@@ -60,7 +60,7 @@ export async function getWithSecret(_id: ObjectID, secret: string, reject?: Func
const stream = gridfs.openDownloadStream(_id);
stream.on('error', (err) => {
console.error(err);
if (reject) reject();
if (reject) reject(err);
});
return stream;
}
@@ -71,7 +71,7 @@ export async function get(_id: ObjectID, reject?: Function) {
const stream = gridfs.openDownloadStream(_id);
stream.on('error', (err) => {
console.error(err);
if (reject) reject();
if (reject) reject(err);
});
return stream;
}