'Returns True if the formset needs to be multipart, i.e. it
has FileInput. Otherwise, False.'

def is_multipart(self):

    if self.forms:
        return self.forms[0].is_multipart()
    else:
        return self.empty_form.is_multipart()
