Campezzi, thanks a lot! This indeed works! I did the Jobeet tutorial,
but oviously I read over it.
public function generateFileFilename(){
return 'testnow.pdf';
}
My file has a neat testnow.pdf file name on upload.
On 31 mrt, 15:05, Campezzi <[email protected]> wrote:
> I didn't test this, but I remember seeing something like that in the
> Jobeet tutorial:
>
> "If a generateLogoFilename() method exists in the model, it will be
> called by the validator and the result will override the default
> generated logo filename. The method is given the sfValidatedFile
> object as an argument."
>
> More info here:http://www.symfony-project.org/jobeet/1_2/Doctrine/en/10
>
> Let me know if that worked! :)
>
> Cheers
>
> On Mar 30, 6:51 am, HAUSa <[email protected]>
> wrote:
>
> > When I upload a file using sfWidgetFormInputFile() and sfValidatorFile
> > (), it gets some sort of MD5 / SHA1 filename. For example,
> > cf95672e445d03249959d832441ff5095b6b6d12.docx.
>
> > Is it possible to keep the original file name, eventually slugified?
>
> > Example:
> > Upload: our marketing plan.docx
> > File: our-marketing-plan.docx
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---