mantiqh-resizer-js
Version:
File uploading package in AWS S3
13 lines (12 loc) • 514 B
TypeScript
/**
* Resize an image (provided as a buffer) and upload it to S3.
* @param {Buffer} fileBuffer - Image file as a buffer.
* @param {number} width - Desired width.
* @param {number} height - Desired height.
* @param {string} outputKey - S3 object key (filename).
* @returns {Promise<string>} - Returns the CloudFront URL of the uploaded file.
*/
export declare function resizeAndUpload(fileBuffer: Buffer, width: number, height: number, outputKey: string): Promise<{
url: string;
message: string;
}>;