From c3e9a98647a78bdb73b1c3e25cf9ae596b30fb8c Mon Sep 17 00:00:00 2001 From: Ary Raditya Date: Sat, 26 Nov 2022 12:59:02 +0800 Subject: [PATCH] feat: return original filename for memory storage --- src/storage/disk-storage.ts | 1 - src/storage/memory-storage.ts | 1 + src/storage/storage.ts | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/storage/disk-storage.ts b/src/storage/disk-storage.ts index 95e9a6a..edfbd4a 100644 --- a/src/storage/disk-storage.ts +++ b/src/storage/disk-storage.ts @@ -14,7 +14,6 @@ import { pump } from "../stream"; export interface DiskStorageFile extends StorageFile { dest: string; filename: string; - originalFilename: string; path: string; } diff --git a/src/storage/memory-storage.ts b/src/storage/memory-storage.ts index 787d88d..ad0f71a 100644 --- a/src/storage/memory-storage.ts +++ b/src/storage/memory-storage.ts @@ -24,6 +24,7 @@ export class MemoryStorage implements Storage { encoding, mimetype, fieldname, + originalFilename: file.filename, }; } diff --git a/src/storage/storage.ts b/src/storage/storage.ts index 0bcb684..7d8a5d4 100644 --- a/src/storage/storage.ts +++ b/src/storage/storage.ts @@ -6,6 +6,7 @@ export interface StorageFile { fieldname: string; encoding: string; mimetype: string; + originalFilename: string; } export interface Storage {