mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
⚡ Improve error message
This commit is contained in:
parent
8ee60e471b
commit
918fba81cc
|
@ -133,7 +133,15 @@ export class Twitter implements INodeType {
|
|||
let attachmentBody = {};
|
||||
let response: IDataObject = {};
|
||||
|
||||
if (binaryData[binaryPropertyName].mimeType.includes('image')) {
|
||||
const isAnimatedWebp = (Buffer.from(binaryData[binaryPropertyName].data, 'base64').toString().indexOf('ANMF') !== -1);
|
||||
|
||||
const isImage = binaryData[binaryPropertyName].mimeType.includes('image');
|
||||
|
||||
if (isImage && isAnimatedWebp) {
|
||||
throw new Error('Animated .webp images are not supported use .git instead');
|
||||
}
|
||||
|
||||
if (isImage) {
|
||||
|
||||
const attachmentBody = {
|
||||
media_data: binaryData[binaryPropertyName].data,
|
||||
|
|
Loading…
Reference in a new issue