I have a problem to upload an image using Symfony.
I have a form where I get the links of banners, those banners are hosted on different websites.
But, I need to save them on my server, how to do it in an action class in Symfony?
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Don’t use an action, use a form!
You create a simple text input, but you use a custom validator extending the sfValidatorFile (used for classic file upload). This validator is returning a sfValidatedFile, safe and really easy to save with the save() method.
Here is an example code of my own: