Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when uploading more than 10mb with HTTP Request #3171

Closed
chemi392 opened this issue Apr 21, 2022 · 3 comments
Closed

Error when uploading more than 10mb with HTTP Request #3171

chemi392 opened this issue Apr 21, 2022 · 3 comments
Labels
node/issue Issue with a node

Comments

@chemi392
Copy link

chemi392 commented Apr 21, 2022

Describe the bug
When posting a binary larger than 10MB the node will fail with the error "Request body larger than maxBodyLength limit"

To Reproduce
Steps to reproduce the behavior:

  1. Create an HTTP Request node
  2. Set to POST
  3. JSON/RAW Parameters = True
  4. Body Content Type = Raw Custom
  5. Send Binary = True
  6. Binary Property = data
  7. Headers = {{ {"Content-Type": "application/binary"} }}
  8. Upload a file larger than 10MB

Expected behavior
File Uploads

Environment (please complete the following information):

  • OS: Ubuntu Linux 20.04
  • n8n Version 0.169.0
  • Database system MySQL (problem also persisted in SQLite)
  • Operation mode own
  • Using Docker Image

Additional context
In the docker image maxBodyLength and maxContentLength in /usr/local/lib/node_modules/n8n/node_modules/axios/lib/defaults.js are both set to -1 which would imply unlimited, however that fails with files over 10MB. If -1 is replaced with a number larger than 1024 * 1024 * [max expected file size] it works with files over 10MB up to the max expected file size.

@Joffcom
Copy link
Member

Joffcom commented Apr 22, 2022

Hey @chemi392,

This is something we are aware of, At the moment the workaround is to use Axios from a function node to upload the data which isn't ideal and can get tricky depending on what auth is needed.

@Joffcom Joffcom added the node/issue Issue with a node label Apr 22, 2022
@janober janober added the Upcoming Release Will be part of the upcoming release label May 27, 2022
@janober
Copy link
Member

janober commented May 27, 2022

The problem should be fixed by this PR #3370 which got already merged and will be released with the next version.

@janober janober closed this as completed May 27, 2022
@janober
Copy link
Member

janober commented May 30, 2022

Fix got released with [email protected]

@janober janober removed the Upcoming Release Will be part of the upcoming release label May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node/issue Issue with a node
Projects
None yet
Development

No branches or pull requests

3 participants