How to handle client abort / disconnect while uploading multipart file #2976
Unanswered
hermantolim
asked this question in
Q&A
Replies: 1 comment 2 replies
-
If the client disconnects, your handler will be aborted, i.e. not polled anymore. You need to either spawn your operation with |
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
Hello, i am trying to handle a client abort upload on axum multipart form data, currently, there is no way to know the client side status, in js we would have event to handle abort signal, and cancel the upload completely, by removing the file in temporary folder, or in my case I proxy the upload to s3 multipart upload, and using the
tokio-utils
to turn thefield
intoStreamReader
so i can upload it to s3 part by part, here is a snipped of my codes:Beta Was this translation helpful? Give feedback.
All reactions