fix(#199): stop content download when request is canceled and always define contentLength

This commit is contained in:
tdurieux
2023-04-20 23:20:08 +02:00
parent 0a021d6e61
commit 13e5e35d46
6 changed files with 74 additions and 46 deletions

View File

@@ -52,6 +52,12 @@ export interface StorageBase {
*/
read(path: string): Readable;
fileInfo(path: string): Promise<{
size: number | undefined;
lastModified: Date | undefined;
contentType: string;
}>;
/**
* Write data to a file
* @param path the path to the file