Closed martinyonatann closed 1 month ago
to resolve this issue #2672
any update @aldas ?
This is a good improvement. Thank you.
I took some liberties and modified your PR to my maintainer preferences https://github.com/aldas/echo/commit/8c702f423c0f802efed2f6e39b9d75ae1c1cb751
I think plain/non-pointer multipart.FileHeader
should not be allowed bound to, as you can not determine easily from struct field if it was bound into or not. Field of type multipart.FileHeader
struct sound more like field that MUST be bound to but Echo struct tag binding does not have concept of "must". Does this sound acceptable?
If you agree to, I would edit this PR.
hi @aldas, i agree with your suggestions. Please feel free to proceed with editing the PR as you see fit.
Ok, done, Thank you @martinyonatann . I'll probably do another release in couple of days to get this released.
Summary This PR introduces support for handling multipart requests that contain multiple files in the
bind
function. It extends the current functionality to allow seamless parsing and binding of multiple files uploaded through multipart form data.Changes
bind
logic to handle multiple file uploads in a single request.FormFile
.Testing
Additional Information This update improves the flexibility of the
bind
function when dealing with file uploads, making it easier to handle bulk file operations in a single request.