HTTP request node can not download from URL

Describe the problem/error/question

I try to download a file from a public URL with the help of the http request node. With most of the URLs I tried, this works without problem. But not with a temporary download file from SeaTable. Unfortunately, the links are only available for some hours therefore I can not share it with you.

What is the error message (if any)?

No matter what I configure in the HTTP response node, I always get:

ERROR: invalid extended field value

Other observations

I tried to nail down the problem and therefore used different techniques to get the file:

Then I check the logs on the server providing the file.

\- \54.86.xx.xx [\21/Sep/2023:01:06:02 +0200] "\GET /seafhttp/files/1f717415-e80a-455f-8a7b-7f05e250c81d/bogdan.png HTTP/1.1" \200 \358013 "\-" "\PostmanRuntime/7.33.0" \0.004
\- \24.13.xx.xx [\21/Sep/2023:01:06:18 +0200] "\GET /seafhttp/files/1f717415-e80a-455f-8a7b-7f05e250c81d/bogdan.png HTTP/1.1" \200 \358013 "\-" "\axios/0.21.4" \0.003

The first request comes from postman and is working. The second request comes from the http request node and is not working. As you can see, there is no difference and the result is status code 200.

I then tried to harmonize the headers, thanks to webhook.site. In the end, all headers were the same of axios and postman. Still, I don’t get the content of the file.

Does anybody have any idea?

Information on your n8n setup

  • n8n version: 1.6.1
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): ??
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker, local
  • Operating system: ubuntu 22.04

Hello @christophdb,

I also encountered exactly the same issue while automating some tasks in SeaTable with n8n. I had multiple workflows asking the SeaTable-API for a direct download link and downloading the file with a second HTTP-Request node, but after updating n8n to version 1.x (and SeaTable to Version 4.1.9) the HTTP-Request node seems to be unable to download the file. Other downloads, like public links or s3 files, are still working though.

I created a post yesterday as well, as soon as I noticed that some workflows started to fail after the update. I shared a link in hopes that someone would be able to reproduce the bug before it expires but I don’t think that happened.

I did some more testing today with more links and services, and so far every file download works except for SeaTable

Thanks for your feedback. So before the update of n8n and SeaTable it was working?

Thank you for the reply,

yes, it has been working without any problems over the past few months. Only after updating both tools, the error started to appear.

I did some further testing by installing an older n8n version next to the new one and the HTTP-Request-Node in that version (before version 1.0) is able to download the file without any problems.

Hi folks, I am very sorry for the trouble. I suspect this has to do with the content-disposition header handling originally introduced in [email protected].

It should be fixed in [email protected] (fix(core): Make parsing of content-type and content-disposition headers more flexible by elsmr · Pull Request #7217 · n8n-io/n8n · GitHub). Can you give this a quick go and let me know if you’re still running into trouble here?

4 Likes

Hey @MutedJam

Thank you for the reply. I updated to version 1.8.0 and everything works again :+1:
It’s always so awesome how fast issues are noticed and fixed, and also how fast y’all respond. :upside_down_face:

On a side note: I totally, absolutely, definitely didn’t spend the last 3 hours making a small node.js / express.js API that just downloads and sends the file to n8n, acting as a relay :smiling_face_with_tear:
I wanted to an excuse to learn something new anyways xD

Thanks again for your answer, and have a great day :slight_smile:

1 Like

I can confirm that the download of the files via HTTP-request node is working again with 1.8.0.
Thank you very much.

1 Like

Lol, I did something similar a while back when trying to parse tables in PDF files and noticed the Read PDF node struggling with this. It feels a bit like “Kanonen auf Spatzen”, but the way I see it is this:

If it it feels stupid and works it’s not stupid :smiley:

I am still very sorry for making you do this here.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.