Uploading a XML file to S3

Can’t figure out how to upload a XML file I just downloaded to S3 and have the proper mime-type

Information on your n8n setup

  • n8n version:1.67.1
  • Database (default: SQLite):PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Linux

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Welcome to the community @MikevdBerge !

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.

Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!


And how did you configure your S3 node? Do you have the matching binary field names? What error message do you get if it is not working for you? Your screenshot does not indicate you get one. So, what is not working?

3 Likes

The XML file is uploaded to the S3 bucket without an error. But the mime-type is incorrect. The mime-type is text/html instead of application/xml.
I’m not using binary data as the file contains XML (text data).

.
Request headers in Postman

1 Like

The issue is still not fixed. Any ideas on how to fix this?

Does the binary has MIME type set correctly in the first place? Your screenshot shows the text content. There is no binary file there.

Hey @MikevdBerge - The HTTP request doesn’t give you a binary. You could try this code step in between to set the mime type. This way, AWS will have the correct mime type. Hope this helps.

2 Likes

It works now. Your help is much appreciated. Although I think n8n could set the correct mime-type for binary files like XML files.

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