HTTP Request Node: Read filename from content-disposition header when downloading files

HTTP Request Get file link gives me an incomplete binary file. Only Mime Type: image/jpeg is visible. At the same time, the link in the browser downloads the file.
Please help me, how in this situation can I can get a complete binary file - with extension and name?
Thank you.
Regards, Aleksandr.

Information on your n8n setup

  • **n8n version:**0.174.0
  • **Running n8n via [Docker, npm,, desktop app]:**Docker

I checked with the service where the file is stored - the link is redirected. The link is
In the node put all the options I could, but the binary file still does not contain the name and extension of the file.
Please help me how to get binary file with name and extension.

How can I get an output like the one on the test file?:

Hey @asuhan, I am not aware of a way to set the filename from the content-disposition header in your screenshot on the fly unfortunately, so I have converted this into a feature request for the time being.

As a workaround, you could manually rename the file like so if needed:

This example code is built upon this snippet provided by a helpful Stack Overflow user and further uses getBinaryData() and setBinaryData(binaryData) to manipulate the binary data received by the HTTP Request node.

Hope this helps!

MutedJam, I have no words to express my admiration and gratitude. You are simply magical!
Thank you so much for all your help!

1 Like

You are most welcome, glad to hear this helps!