Symfony2 File Upload Error – “guessExtension() always return nil”
Symfony 2.0 RC1 was released a few days ago, do not forget to grab it, it is very stable now!
Today I’m facing an error which made me crazy a few hours.
I’m trying to get the file upload on Symfony 2 done but never success on my Windows + wamp machine.
Yup, like what I’ve written on the subject, when I try to move the file using UploadedFile->move() and tell the framework to guess the file extension for me using UploadedFile->guessExtension().
It always return nil, the getExtension() is working but not useful at all because the uploaded file always be ended with tmp extension.
Even though I can’t found the solution after researched on Google for a few hours.
Until I try to dig into the symfony source code itself and I finally found it is using php_fileinfo extension!
So, I just resolve my issue by enabling the php_fileinfo extension from wamp and it works!
Wasted my few hours… Learn new things…
Facebook comments:
5 Responses to Symfony2 File Upload Error – “guessExtension() always return nil”
Leave a Reply Cancel reply
Archives
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- March 2011
- February 2011
- January 2011
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- January 2010
- December 2009
- October 2009
- August 2009
- July 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- June 2007
Tags
.net 2008 asp.net asp.net mvc asus eee c# corona cpa doctrine dom eee eee pc Internet Marketing ios iPad iphone iPhone development iphone sdk javascript make money netbook online marketing pagerank passion php playstation playstation 3 ps3 ranking ror ruby on rails self help Self Improvement self motivation seo sql success symfony take action the secret ultra compact laptop ultra compact notebook vb.net web development wordpress






Thanks for that! I also get stucked for hours with that problem…they should add a note in the documentation because it’s not a standard
Regards nymo
Thank you so mutch for solving my issue !!!
Thank you so much, you saved my day !
Thanks – worked for me too!
Thank you, usefull tips. Should be written in the official docmentation.