diff --git a/apps/ingest/forms.py b/apps/ingest/forms.py index a4f57fcb..a4cc6686 100644 --- a/apps/ingest/forms.py +++ b/apps/ingest/forms.py @@ -2,10 +2,15 @@ from django.forms import ClearableFileInput from .models import Bulk + +class MultipleFileInput(forms.ClearableFileInput): + allow_multiple_selected = True + + class BulkVolumeUploadForm(forms.ModelForm): class Meta: model = Bulk - fields = ['image_server', 'volume_files', 'collections'] + fields = ["image_server", "volume_files", "collections"] widgets = { - 'volume_files': ClearableFileInput(attrs={'allow_multiple_selected': True, 'multiple': True}), + "volume_files": MultipleFileInput, }