UNPKG

@nestjs-mod/files

Version:

Files module with an error filter, controller and rest-sdk for work with module from other nodejs appliaction

29 lines (28 loc) 861 B
import { FilesPresignedUrls } from './types/dto'; export declare enum FilesDefaultBucketNames { images = "images", video = "video", documents = "documents" } export type FilesModuleBucket = Record<string, { policy: any; ext: string[]; }>; export declare class FilesConfiguration { getFromDownloadUrlWithoutBucketNames: (downloadUrl: string) => { bucketName: string; objectName: string; }; getPresignedUrls: ({ bucketName, fullObjectName, ext, userId, }: { bucketName: string; fullObjectName: string; ext: string; userId: string; }) => Promise<FilesPresignedUrls>; deleteFile: ({ bucketName, objectName, downloadUrl, }: { bucketName: string; objectName: string; downloadUrl: string; }) => Promise<void | null>; buckets?: FilesModuleBucket; }