File (images/pdfs), cant obtain the binary data?

Hey guys, I’ve been trying to create get a file/image from airtable > download the downloadable file (not the view only) > Upload it into a local accounting software, but file has to be in binary data.

Describe the problem/error/question

So far i’ve been able to get the downloadable URL, after downloading the URL, when calling the accounting systems API to upload the file. It somehow only shows me some HTML data only.

Is there a way to check for to get the binary data, cause I suspect maybe the way I’m doing it right now is not getting the right binary data from the file.

This is the sample payload from the API documentation:

Request samples

  • Payload

Content type

  • multipart/form-data
    {
    “file”: “0101010101…”
    }

Please do let me know if you need anymore extra data, as I’m not too sure if this is sufficient for you to provide input on this issue im facing right now. Thanks

When downloading the file from URL, response format is set to file and output is paymentProof

Uploading > body content type was just n8n Binary File. and input Data is paymentProof.

Information on your n8n setup

  • n8n version: cloud, free version
  • Database (default: SQLite): -
  • n8n EXECUTIONS_PROCESS setting (default: own, main): -
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: MacOS

Body Content Type: multipart/form-data ✓ (This is correct)

Body Parameters:

Parameter Type: Select n8n Binary File (not “Form Data”)

Name: file (as shown in your API documentation)

Input Data Field Name: paymentProof (the name of your binary field)

1 Like

Sorry, just saw your reply, but I tried again but it didnt manaage to create a record in the files of the accounting system.

Not sure if its the API url issue, as I tried it on their Live API i was able to upload the file. However when using the staging API (current one) it somehow did not work

The 200 response on your request means it arrived but it wasn’t processed… something it may block that content. (I had this issue with a free hosting anti bot wall)….

hmmm i see, lemme check with their dev team then. Thanks for pointing out the form data!

Yep… definitely is on their end, NOT n8n.

When you find out, please share here so others may find this useful.

Sure thing :+1:

@Parintele_Damaskin Thanks for your reply so far, reached out to their dev team and it turns out the staging URL was outdated already hahha…

1 Like

If any answer solved your issue… please mark it as solved.

Yea, at the end… it was their issue lol.

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