Ticket #208 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

File required if mimetype set

Reported by: aw@… Owned by: gerd
Priority: normal Milestone: v0.9.0 stable
Component: patForms Version: 0.9.0b1
Severity: normal Keywords:
Cc:

Description

When using the patForms File-Element the required attribute will work fine, if you set the mimetype-attribute and required = no, it is not possible to send the form.

The displayed error message is:

File upload: Wrong mime-type (Mime-Typ: "" )

        'testfile' => array(
            'type' => 'File',
            'attributes' => array(
                'id'            =>    'testfile',
                'required'      =>    'no',
                'display'       =>    'yes',
                'edit'          =>    'yes',
                'title'         =>    'File upload',
                'label'         =>    'File upload',
                'description'   =>    'Upload a file of your choice...',
                'uploaddir'     =>    './fileupload',
                'overwrite'     =>    'no',
                'usesession'    =>    'no',
                'mimetype'      =>    array( 'application/pdf' ),
            ),
        ),

Change History

comment:1 Changed 7 years ago by schst

  • Owner changed from argh to gerd

comment:2 Changed 7 years ago by schst

  • Milestone changed from none to v0.9.0 stable

comment:3 Changed 7 years ago by gerd

  • Status changed from new to assigned

comment:4 Changed 7 years ago by gerd

  • Status changed from assigned to closed
  • Resolution set to fixed

done...

BTW, thanks for reporting this bug.

Cheers gERD

comment:5 Changed 7 years ago by schst

  • Status changed from closed to reopened
  • Resolution fixed deleted

This has not been committed to the trunk.

comment:6 Changed 7 years ago by gerd

  • Status changed from reopened to closed
  • Resolution set to fixed

commited fixes in trunk (revision 355)

Note: See TracTickets for help on using tickets.