mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-09-01 12:08:24 -06:00
parent
fe1a93da10
commit
811e369c99
@ -2100,10 +2100,10 @@ export class ChatwootService {
|
|||||||
const nameFile = `${random}.${mimeTypes.extension(mimeType)}`;
|
const nameFile = `${random}.${mimeTypes.extension(mimeType)}`;
|
||||||
const fileData = Buffer.from(imgBuffer.data, 'binary');
|
const fileData = Buffer.from(imgBuffer.data, 'binary');
|
||||||
|
|
||||||
const img = await Jimp.fromBuffer(fileData);
|
const img = await Jimp.read(fileData);
|
||||||
img.cover(320, 180);
|
await img.cover(320, 180);
|
||||||
|
|
||||||
const processedBuffer = await img.getBuffer('image/png');
|
const processedBuffer = await img.getBufferAsync(Jimp.MIME_PNG);
|
||||||
|
|
||||||
const fileStream = new Readable();
|
const fileStream = new Readable();
|
||||||
fileStream._read = () => {}; // _read is required but you can noop it
|
fileStream._read = () => {}; // _read is required but you can noop it
|
||||||
|
Loading…
Reference in New Issue
Block a user