Absolutely.
----- Message d'origine ---- De : julien <[EMAIL PROTECTED]> À : symfony users <symfony-users@googlegroups.com> Envoyé le : Dimanche, 5 Octobre 2008, 22h27mn 35s Objet : [symfony-users] Re: Re : [symfony-users] Re: file name changed after upload thanks for your answers. I think I'll try to override the save, but I'm not quite sure how to do it. I've been in the source : /cache/<my_app>/dev/modules/auto<my_module>/ actions/actions.class.php It seems that two methods are actually used to save the form. executeEdit() and updatePublicationsFromRequest() In order to have my own naming system, do I have to create a method called executeEdit and another one called updatePublicationsFromRequest in /apps/<my_app>/modules/<my_module>/ actions/actions.class.php ? Then implement my own code in it? thanks for your advices, Julien On 5 oct, 17:21, Loïc Vernet <[EMAIL PROTECTED]> wrote: > Humm i didn't know (remember) that, thanks. It's great for a basic file > naming, but for an advanced one i think the save will have to be overridden. > > ----- Message d'origine ---- > De : julien meyer <[EMAIL PROTECTED]> > À : symfony-users@googlegroups.com > Envoyé le : Dimanche, 5 Octobre 2008, 16h42mn 31s > Objet : [symfony-users] Re: file name changed after upload > > Hello Julien, > The file name is changed since he's encoded via sha1() function > (http://fr2.php.net/manual/en/function.sha1.php) by default. > > I think it's not recommended to keep the original file name (name conflict, > security...), but you can customise the filename via the generator.yml : > > generator: > class: sfPropelAdminGenerator > param: > model_class: Example > theme: default > > edit: > fields: > pdf: > type: admin_input_file_tag > upload_dir: pdf_files > filename: pdf_%%id%% > params: include_link=user_pics include_remove=true > > For the third record of your database, the filename will be "pdf_3.pdf". > > Take a look here :http://www.symfony-project.org/forum/index.php/m/54777 > > 2008/10/5 julien <[EMAIL PROTECTED]> > > Hi, > I have generated an admin backend. > Some fields are type of "admin_input_file_tag". > It works fine. Except that the file name is changed. > For instance, uploading "fake_article.pdf" becomes > "1e0d5f6621b2a5a05dffdbfcd787ed31.pdf" > > Is it possible to keep the original file name? > > Thanks, > > Julien --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---