'When the form is created by parsing an HTTP request which contains a
multipart/form, it is possible to know the name of the file which is
being uploaded.
This method returns the name of the file being uploaded given the
parameter name (pname) where it was sent.'

def get_file_name(self, pname, default=None):

    form_field_list = self.meta.get(pname, None)
    if (form_field_list is None):
        return default
    for form_field in form_field_list:
        if isinstance(form_field, FileFormField):
            return form_field.file_name
    return default
