Replies: 2 comments 2 replies
-
I found a fix for my particular problem. It appears that # development.yaml
server:
# ... other settings
middlewares:
# Limit payload size for incoming requests.
limit_payload:
enable: true
# Maximum payload size in bytes.
body_limit: 10485760 # 1MB # src/controllers/foo.rs
const MAX_FILE_SIZE: usize = 1024 * 1024 * 10; // 10MB
Routes::new()
.prefix("api/foo")
.add("/", post(upload)).layer(DefaultBodyLimit::max(MAX_FILE_SIZE)) |
Beta Was this translation helpful? Give feedback.
0 replies
-
@BWStearns It would be great if you could open a PR to fix this! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I ran into an issue with file uploading. It appears that I can upload small files, but not those above 2MB, despite
limit_payload
being disabled. Is there another setting that also controls this? (cargo loco middleware --config
output below)Beta Was this translation helpful? Give feedback.
All reactions