Use self.files.getlist('images')
in clean
method to iterate over multiple images:
def clean_images(self):
files = self.files.getlist('images')
for file in files:
if file:
if file._size > 15*1024*1024:
raise forms.ValidationError("Image file is too large ( > 15mb ).")
else:
raise forms.ValidationError("Could not read the uploaded file.")
return files