Replies: 2 comments 2 replies
-
Where do you observe the I'm not sure but it might be because you're sending an error while the body is still being transmitted. It should definitely not discard the error though. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You are correct, responding with an error during the transmission phase can cause issues. |
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
-
Summary
I want to use Axum to accomplish the task of uploading large files.
When handling the upload, I will first check the X-API-KEY in the header to ensure it is correct. Then, I will check if the file format is correct. If there is an issue with the header or the file format, I will return a BadRequest in advance.
For small files, the error message received by the front end is normal. However, for large files (3MB), a net::ERR_CONNECTION_ABORTED error occurs.
I have already adjusted the DefaultBodyLimit and RequestBodyLimitLayer.
Here is my code
Route
Handle
axum version
0.75
Beta Was this translation helpful? Give feedback.
All reactions