mirror of
https://github.com/sergeyyarkov/educt-server.git
synced 2026-10-11 18:29:15 +03:00
27 lines
762 B
TypeScript
27 lines
762 B
TypeScript
declare module '@ioc:Adonis/Addons/Cloudinary' {
|
|
import { ResponseCallback, TransformationOptions, UploadApiOptions, UploadApiResponse } from 'cloudinary';
|
|
import { MultipartFileContract } from '@ioc:Adonis/Core/BodyParser';
|
|
|
|
export interface CloudinaryConfig {
|
|
cloudName: string;
|
|
apiKey: string;
|
|
apiSecret: string;
|
|
secure: boolean;
|
|
[key: string]: TransformationOptions;
|
|
}
|
|
|
|
export interface CloudinaryInterface {
|
|
upload(
|
|
file: MultipartFileContract,
|
|
publicId: string | undefined,
|
|
uploadOptions?: UploadApiOptions,
|
|
callback?: ResponseCallback
|
|
): Promise<UploadApiResponse>;
|
|
|
|
getConfig(): CloudinaryConfig;
|
|
}
|
|
|
|
const CloudinaryService: CloudinaryInterface;
|
|
export default CloudinaryService;
|
|
}
|