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();
|
||||
await fs.close(file);
|
||||
} else {
|
||||
controller.enqueue(buff);
|
||||
controller.enqueue(buff.slice(0, bytesRead));
|
||||
}
|
||||
} catch (e) {
|
||||
await fs.close(file);
|
||||
|
|
Loading…
Reference in a new issue