slice buff to bytesRead size
This commit is contained in:
parent
764a3aa415
commit
d9a37ffd71
|
@ -42,7 +42,7 @@ export const getFileStream = async (filePath: string) => {
|
||||||
controller.close();
|
controller.close();
|
||||||
await fs.close(file);
|
await fs.close(file);
|
||||||
} else {
|
} else {
|
||||||
controller.enqueue(buff);
|
controller.enqueue(buff.slice(0, bytesRead));
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await fs.close(file);
|
await fs.close(file);
|
||||||
|
|
Loading…
Reference in a new issue