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 f58e792 commit abe25d2Copy full SHA for abe25d2
src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts
@@ -2100,10 +2100,9 @@ export class ChatwootService {
2100
const nameFile = `${random}.${mimeTypes.extension(mimeType)}`;
2101
const fileData = Buffer.from(imgBuffer.data, 'binary');
2102
2103
- const img = await Jimp.fromBuffer(fileData);
+ const img = await Jimp.read(fileData);
2104
img.cover(320, 180);
2105
-
2106
- const processedBuffer = await img.getBuffer('image/png');
+ const processedBuffer = await img.getBufferAsync(Jimp.MIME_PNG || 'image/png');
2107
2108
const fileStream = new Readable();
2109
fileStream._read = () => {}; // _read is required but you can noop it
0 commit comments