mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
⚡ Add extra larga size option to Telegram (#2827)
This commit is contained in:
parent
0a9ce092fc
commit
c026642f7b
|
@ -10,7 +10,9 @@ import {
|
||||||
} from 'request';
|
} from 'request';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
IBinaryData, IDataObject, NodeApiError, NodeOperationError,
|
IDataObject,
|
||||||
|
NodeApiError,
|
||||||
|
NodeOperationError,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
// Interface in n8n
|
// Interface in n8n
|
||||||
|
@ -185,6 +187,7 @@ export function getImageBySize(photos: IDataObject[], size: string): IDataObject
|
||||||
'small': 0,
|
'small': 0,
|
||||||
'medium': 1,
|
'medium': 1,
|
||||||
'large': 2,
|
'large': 2,
|
||||||
|
'extraLarge': 3,
|
||||||
} as IDataObject;
|
} as IDataObject;
|
||||||
|
|
||||||
const index = sizes[size] as number;
|
const index = sizes[size] as number;
|
||||||
|
|
|
@ -121,7 +121,7 @@ export class TelegramTrigger implements INodeType {
|
||||||
name: 'download',
|
name: 'download',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
default: false,
|
default: false,
|
||||||
description: `Telegram delivers the image in 3 sizes. By default, just the larger image would be downloaded. If you want to change the size, set the field 'Image Size'.`,
|
description: `Telegram delivers the image in multiple sizes. By default, just the large image would be downloaded. If you want to change the size, set the field 'Image Size'.`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Image Size',
|
displayName: 'Image Size',
|
||||||
|
@ -147,6 +147,10 @@ export class TelegramTrigger implements INodeType {
|
||||||
name: 'Large',
|
name: 'Large',
|
||||||
value: 'large',
|
value: 'large',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Extra Large',
|
||||||
|
value: 'extraLarge',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
default: 'large',
|
default: 'large',
|
||||||
description: 'The size of the image to be downloaded',
|
description: 'The size of the image to be downloaded',
|
||||||
|
|
Loading…
Reference in a new issue