mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
fix response pipe, remove multipart
This commit is contained in:
1 parent
65a50275b1
commit
af9a8fb206
13 files changed
+70
-46
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user