[symfony-users] Re: Upload file in symfony2

2011-04-16 Thread Treur
Nope. Thats symfony 1. For Symfony 2 1. Add an Entity class with a file property. Provide some validation data for specific mime-types and file size. namespace WeatherVane\SyncBundle\Entity; class UploadedData { /** * @validation:File( * maxSize = "10M", * mimeTypes = {

[symfony-users] Re: Upload file in symfony2

2011-04-13 Thread Laxmi
hear is the code i used to upload image $dir = sfConfig::get('sf_web_dir').'\images\user\ '; $filename = $_FILES["file"]["name"]; move_uploaded_file($_FILES["file"]["tmp_name"],$dir.$filename); On Apr 13, 12:40 pm, Carl wrote: > I'm not aware of anything built-in that takes c

[symfony-users] Re: Upload file in symfony2

2011-04-13 Thread Carl
I'm not aware of anything built-in that takes care of file uploads but it probably wouldn't be too difficult to incorporate the HTTP_Upload PEAR package into your project: http://pear.php.net/package/HTTP_Upload Unfortunately, it's no longer maintained (at the moment anyway), but I've never re