diff --git a/services/filestore/app/coffee/FSPersistorManager.coffee b/services/filestore/app/coffee/FSPersistorManager.coffee index d00b112c27..4d6d79b1a7 100644 --- a/services/filestore/app/coffee/FSPersistorManager.coffee +++ b/services/filestore/app/coffee/FSPersistorManager.coffee @@ -53,6 +53,8 @@ module.exports = targetStream.on 'error', (err) -> logger.err err:err, location:location, key:filteredToName, "Error writing to file" callback err + targetStream.on 'finish', () -> + callback null sourceStream.pipe targetStream deleteFile: (location, name, callback)->