mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
ENHANCEMENT: use UplocadField constructor combine with give the field allowedExtensions as array('jpg', 'git', 'png') to replace the SimpleImageField constructor
This commit is contained in:
parent
0a4f22a08f
commit
a2e3738f66
@ -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")
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user