diff --git a/packages/nc-plugin/src/lib/IStorageAdapterV2.ts b/packages/nc-plugin/src/lib/IStorageAdapterV2.ts index a5063d760e..b60dd5fea1 100644 --- a/packages/nc-plugin/src/lib/IStorageAdapterV2.ts +++ b/packages/nc-plugin/src/lib/IStorageAdapterV2.ts @@ -13,21 +13,23 @@ import IStorageAdapter from './IStorageAdapter'; The methods are not used in current codebase, but will be used in future. */ -export default interface IStorageAdapterV2 extends IStorageAdapter { +export default interface IStorageAdapterV2< + FileCreateByUrlOptions extends { + fetchOptions?: { + buffer?: boolean; + }; + } = { + fetchOptions?: { + buffer?: boolean; + }; + } +> extends IStorageAdapter { fileCreateByUrl( destPath: string, url: string, - fileMeta?: FileMeta, - fetchOptions?: any - + options?: FileCreateByUrlOptions ): Promise; fileCreateByStream(destPath: string, readStream: Readable): Promise; fileReadByStream(key: string): Promise; getDirectoryList(path: string): Promise; } - -interface FileMeta { - fileName?: string; - mimetype?: string; - size?: number | string; -}