qor5 / admin

Admin console

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

create multiple file field

vunguyen260798 opened this issue · comments

hello guys, I have this model like this:
Product{
id uuid
images []string
...
}

how can I create a field upload multiple images and save path to images field? please give me some instruction or keyword for this

hi @vunguyen260798 ,
You can use VInputFile with multiple=true to upload multiple files at once and then handle them in the SetterFunc, example code:

ed.Field("FileInput1").
.
Alternatively, you can use the media library along with the list editor to upload images. This allows image preview and single uploads. example code:
func configNestedFieldDemo(b *presets.Builder, db *gorm.DB) {