We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abe25d2 commit fe1a93dCopy full SHA for fe1a93d
src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts
@@ -2100,9 +2100,10 @@ export class ChatwootService {
2100
const nameFile = `${random}.${mimeTypes.extension(mimeType)}`;
2101
const fileData = Buffer.from(imgBuffer.data, 'binary');
2102
2103
- const img = await Jimp.read(fileData);
+ const img = await Jimp.fromBuffer(fileData);
2104
img.cover(320, 180);
2105
- const processedBuffer = await img.getBufferAsync(Jimp.MIME_PNG || 'image/png');
+
2106
+ const processedBuffer = await img.getBuffer('image/png');
2107
2108
const fileStream = new Readable();
2109
fileStream._read = () => {}; // _read is required but you can noop it
0 commit comments