Thanks Karen! I've been stumped on this for quite a while and really appreciate your help, you're the best.
Cheers, J On Aug 10, 5:16 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Mon, Aug 10, 2009 at 3:07 PM, neridaj <neri...@gmail.com> wrote: > > > when I do this it just creates a unix executable file of the same name > > selected from the drop down menu of users, i.e., if a user named > > testuser24 is selected from the user menu and there is a folder named > > testuser24 a unix executable is created named testuser24_. Does this > > have something to do with the instance parameter? > > No, you're not joining in the file name in what you are returning from your > upload_to. Callable upload_to needs to return the full path, so if the user > name part is a directory (folder) then you want to add in the file name > parameter (also passed into your callable) to what you are returning. > > (The added underscore behavior is the way the default storage backend avoids > a newly-uploaded file overwriting an existing one. When it comes time to > write the file to disk, if one with the specified name already exists, an > underscore is added and that name is tried, if that also already exists then > another underscore is added, etc.) > > Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---