[Answer]-Post more files and save them into db – django

1👍

if request.method == 'POST':
    images = request.POST.getlist('images[]')
    other_field = request.POST.get('other_field')

    for i in range(len(images)):
        data = MyModel()
        data.images = images[i]
        data.other_field = other_field
        data.save()

Leave a comment