Closed scrummie02 closed 2 years ago
Hmm you could make tus to respekt the response of the afterComplete cb.
const endReq = () => {
// It MUST include the Upload-Offset header containing the new offset.
res.set('Upload-Offset', offset)
// The Server MUST acknowledge successful PATCH requests
// with the 204 No Content status.
res.status(204)
res.end()
}
if (upload && upload.uploadLength === offset) {
if(await after(req, upload, uploadId) !== false) {
endReq();
}
} else {
endReq();
}
And introduce async afterUploadComplete hooks.
I have found this antivirus solution which accepts api requests: https://github.com/mindcollapse/MalwareMultiScan
It would be great to integrate into psi transfer as an option to have when people upload it scans and if it gets a 200 success code allows the transfer/upload otherwise kicks back the error from the scanner. Is this possible if so what needs to change on the back side to do this?