Bind file from multipart/form-data request
Issue Description
Checklist
- [x] Dependencies installed
- [x] No typos
- [x] Searched existing issues and docs
Hi :D. Is there a way to bind file from multipart/form-data request to a struct field? For example
type Data struct {
File multipart.FileHeader `form:"file"`
}
no at the moment. Could you provide small example for posting data in that way (for example with curl) and I can think if there are some ways to do this.
Currently we delegate all form binding/parsing logic to standard library when it comes to form data. See https://github.com/labstack/echo/blob/f13e2640f0eacdbe1bffc076c25126368d6445d2/bind.go#L93
curl -v http://localhost:8080 -F '[email protected]'
there should also be a file called image.png in the directory you execute the command or you can change the file path
implemented by @martinyonatann in #2684