diff --git a/code/TestFileUploadPage.php b/code/TestFileUploadPage.php index 05bcc3f..eab67e2 100644 --- a/code/TestFileUploadPage.php +++ b/code/TestFileUploadPage.php @@ -10,9 +10,11 @@ class TestFileUploadPage_Controller extends TestPage_Controller{ $fields = new FieldList( new EmailField('Email', 'EmailField'), new FileField('AFile','FileField'), - new SimpleImageField('AImage','SimpleImageField') + $aImage = new UploadField('AImage','SimpleImageField') ); + $aImage->allowedExtensions = array('jpg', 'gif', 'png'); + $actions = new FieldList( new FormAction('addMember', "Add a member with two Files uploaded") );