News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ian Christian's Blog:
Handling Uploaded file in symfony's admin generator
March 12, 2010 @ 11:03:15

Ian Christian has an informative new post for the Symfony developers out there. He's figured out a way to handle uploaded files with Symfony's admin generator relatively easily, changing the filename option.

When a file is uploaded using sfForm in the admin generator, by default the filename that's used is a random string, which can look bad in URLs. If you want to change this, it's not immediately obvious how - but it is incredibly simple.

The Symfony project does have some documentation on the topic, but it's not the easiest to read. It basically boils down to is defining a function in your extended class based on the name of the file where you can change the name however you'd like. Code snippets are included to make the point a bit more clear.

0 comments voice your opinion now!
symfony framework tutorial upload admin


blog comments powered by Disqus

Similar Posts

Ibuildings techPortal: Building an Continuous Integration Server for PHP with Hudson

NETTUTS.com: Create a Basic Shoutbox with PHP and SQL

Rob Allen's Blog: File uploads with Zend_Form_Element_File

BillS' IIS Blog: How to install PHP on IIS7 (RC1)

IBM developerWorks: Understanding the Zend Framework, Part 1: The basics


Community Events











Don't see your event here?
Let us know!


release database application framework support unittest install opinion introduction composer component podcast symfony2 hhvm facebook package hack security performance language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework