go-playground / form

:steam_locomotive: Decodes url.Values into Go value(s) and Encodes Go value(s) into url.Values. Dual Array and Full map support.
MIT License
727 stars 40 forks source link

Multipart form? #55

Open tshubham7 opened 3 years ago

tshubham7 commented 3 years ago

Package version eg. v9, v10:

Issue, Question or Enhancement:

can you tell me, how can i use this for multipart files??

Code sample, to showcase or reproduce:

// Employee
type Employee struct {
    Name  string
    Image *multipart.FileHeader
}

// Employees
type Employees struct {
    Data []Employee
}
{
    "data": [
        {
            "name": "some name1",
            "image": "file1.jpg"
        },
        {
            "name": "some name2",
            "image": "file2.jpg"
        }
    ]
}
deankarn commented 3 years ago

@tshubham7 I'm not 100% clear on your use case. It looks like you incoming data is in JSON format.

apuatcfbd commented 3 months ago

Does it supports file validation?