How to modify filename when obtaining file from http?
1 Like
Hey @CometNet,
You can rename the file name using the Function Node as shown in the example workflow below:
Note: I am updating the configuring the file name in the first line of the code in the Function node. Also, this will work only if you’re receiving a single file. For multiple files you’ll have to tweak the function.
1 Like
for (index in items){
items[index].binary.data = Object.assign(items[index].binary.data, {fileName:"new filename"});
}
return items;
Thank you
2 Likes