So in symfony < ver 1.2, in the backend you could update the generator.yml to change a field type to make it more like a file upload button. I would usually substitute type: admin_input_file_tag and that would automagically convert it to a file upload.
Starting 1.2.x you cant do that anymore. It has quite logically so changed, so instead of changing it in the generator.yml you make the change in the forms class instead. So in my example I have a class called Album Class and I have a field called Album Cover, so i updated the AlbumForm.class.php and store this in there.
class AlbumForm extends BaseAlbumForm
{
public function configure()
{
$this->setWidget('album_cover', new sfWidgetFormInputFile());
$this->setValidator('album_cover', new sfValidatorFile(array('path' => 'uploads/')));
}
}
That updates it inthe admin tool and more so, even on the frontend, there is more like a consistent use experience. Like I always say Symfony is awesome.
[...] blog.rajatpandit.com okbm(‘http://451f.com.ua/2009/02/02/quick-tip-for-file-uploader-in-symfony-12/’,'Загрузка [...]