If you want your uploaded files to stay with the original file name (which is not randomly generated by symfony), just add following lines to the model class you want to upload files:
public function generateXxxFileName($file) { return $file->getOriginalName(); }
where Xxx is the name of the column that stores the filename in the database model related table.
In Symfony 2.3, now changed to $file->getClientOriginalName()
ReplyDelete