-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDownloadMedia.json
More file actions
89 lines (89 loc) · 2.54 KB
/
Copy pathDownloadMedia.json
File metadata and controls
89 lines (89 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
[
{
"id": "download_media_tab",
"type": "tab",
"label": "Download media",
"disabled": false,
"info": "Receives messages, downloads any attached media and writes it to disk.\n\nThe download node accepts the receiver's output as-is. It puts the bytes in msg.payload, the name in msg.filename and the original message in msg.telegram, which is exactly what `file out` expects.\n\nSet a Max size on the download node so a large video cannot be read into memory."
},
{
"id": "download_receiver",
"type": "telegram client receiver",
"z": "download_media_tab",
"name": "receive messages",
"bot": "",
"sendrawevents": false,
"sendnewmessage": true,
"sendeditedmessage": false,
"senddeletedmessage": false,
"sendalbum": false,
"sendcallbackquery": false,
"chats": "",
"blacklistchats": false,
"direction": "any",
"fromusers": "",
"pattern": "",
"x": 160,
"y": 120,
"wires": [["download_has_media"]]
},
{
"id": "download_has_media",
"type": "switch",
"z": "download_media_tab",
"name": "has media?",
"property": "payload.message.media",
"propertyType": "msg",
"rules": [{ "t": "nnull" }],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 370,
"y": 120,
"wires": [["download_media"]]
},
{
"id": "download_media",
"type": "telegram client download",
"z": "download_media_tab",
"name": "download",
"bot": "",
"thumb": "",
"maxsize": "20",
"x": 560,
"y": 120,
"wires": [["download_write", "download_debug"]]
},
{
"id": "download_write",
"type": "file",
"z": "download_media_tab",
"name": "write to disk",
"filename": "filename",
"filenameType": "msg",
"appendNewline": false,
"createDir": true,
"overwriteFile": "true",
"encoding": "none",
"x": 760,
"y": 80,
"wires": [[]]
},
{
"id": "download_debug",
"type": "debug",
"z": "download_media_tab",
"name": "metadata",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 750,
"y": 160,
"wires": []
}
]