reservease.consumer
Version:
This package allows you to create an amqplib consumer and producer.
33 lines (32 loc) • 988 B
TypeScript
/// <reference types="node" />
import { Storage } from '@google-cloud/storage';
import multer from 'multer';
import stream from 'stream';
interface IFileUPload {
projectId: string;
storageBucket: string;
privateKey: string;
storageFolder: string;
fileLimit?: number;
publicUrl?: string;
}
export declare class FilUploadService {
projectId: string;
storageBucket: string;
privateKey: string;
gcStorage: Storage;
storageFolder: string;
hostingProvider: string;
fileLimit?: number;
isRequired: boolean;
_storage: typeof Storage;
_multer: typeof multer;
_stream: typeof stream;
publicUrl?: string;
constructor(params: IFileUPload);
getPublicUrl: (bucketName: string, fileName: string, hostUrl?: string) => string;
UploadToGCS: (req: any, res: any, next: any) => any;
uploadMiddleware: multer.Multer;
UploadBufferToGCSNew: (data: any) => Promise<unknown>;
}
export {};