mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-12 23:46:22 +00:00
fix: possible upload stream starting early
This commit is contained in:
parent
518b29c8df
commit
a646d6731a
@ -432,6 +432,8 @@ self.actuallyUpload = async (req, res, data = {}) => {
|
||||
|
||||
if (hashStream) {
|
||||
hashStream.once('error', _reject)
|
||||
// Ensure readStream will only be resumed later down the line by readStream.pipe()
|
||||
readStream.pause()
|
||||
readStream.on('data', data => {
|
||||
// .dispose() will destroy this internal component,
|
||||
// so use it as an indicator of whether the hashStream has been .dispose()'d
|
||||
|
Loading…
Reference in New Issue
Block a user