Great improvement for this. I try this new methods and it seems that i receive an error:
The fUpload method specified, setMaxFileSize(), is not a valid method
this is the way i put in my configuration class:
fORM::mapClassToTable($this, 'stiri');
fORMDate::configureDateCreatedColumn($this, 'data');
fORMFile::configureFileUploadColumn($this, 'media', $_SERVER['DOCUMENT_ROOT'] . '/cd/uploads/stiri/');
fORMFile::addFImageMethodCall($this, 'media', 'cropToRatio', array(
1,
1
));
fORMFile::addFUploadMethodCall($this, 'media', 'setMaxFileSize', array(
'1mb'
));
fORMFile::addFImageMethodCall($this, 'media', 'resize', array(
200,
200
));
fORMValidation::setMessageOrder($this, array(
'Uploads:',
'Text:',
'Titlu:'
));
fORMValidation::addStringReplacement($this, 'Media: Please enter a value', 'Uploads: Please enter a value');