I'm downloading files from a DAM system for distributing via FTP. My problem is with HTTP Request and file-out. I use these together and the resulting file is always unusable. I've tried with JPG and EPUB (a ZIP) and they can't be opened after download. The request works i.e. I get a payload with the file in it; and the write-file works i.e. I get a file saved on disk. I've tried a variety of return types in HTTP Req and encodings in write-file with no luck. The source file types will vary so I'm looking for a method which will work with any type. Here are the 2 nodes:
[
{
"id": "348bff8a3bb6c980",
"type": "http request",
"z": "b97ef552ede161d0",
"name": "",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [
{
"keyType": "Authorization",
"keyValue": "",
"valueType": "msg",
"valueValue": "token"
}
],
"x": 690,
"y": 620,
"wires": [
[
"ef80dbd968629194",
"fdf09f34a3eb11cf"
]
]
},
{
"id": "fdf09f34a3eb11cf",
"type": "file",
"z": "b97ef552ede161d0",
"name": "Save Asset Download",
"filename": "pathdl",
"filenameType": "msg",
"appendNewline": false,
"createDir": false,
"overwriteFile": "true",
"encoding": "utf8",
"x": 940,
"y": 620,
"wires": [
[
"f69d1d39b2629628"
]
]
}
]