fix: prevent crash in cases when file not uploaded

This commit is contained in:
Zhigang Fang
2021-09-05 11:50:04 +08:00
committed by GitHub
parent 37f5cc7852
commit 94014638a1

View File

@@ -200,7 +200,7 @@ export class StorageLayer {
return undefined;
}
upload.status = UploadStatus.CANCELLED;
this._persistence.deleteFile(upload.fileLocation);
this._persistence.deleteFile(upload.fileLocation, true);
}
public uploadBytes(uploadId: string, bytes: Buffer): ResumableUpload | undefined {