I found a solution on the second part, sending the file back to the
user with the original filename here:
http://stackoverflow.com/questions/1156246/having-django-serve-downloadable-files

I would still need some help on the first part.

Thanks,
Gabriel

On 11 feb., 14:57, Gabriel - Iulian Dumbrava
<gabriel.dumbr...@gmail.com> wrote:
> Hi guys,
>
> I want to do this:
> 1. from admin I want to upload a file, store the original filename but
> change it on the storage device, based on the current date, for
> example 20110211144900.file
> 2. if at a later time someone wants to download that file, it should
> get it back and saved to the local computer with the original
> filename.
>
> I believe I have to make an admin class and override
> get_valid_name(name) somewhere.
>
> On download, I'll have a view for /download/123/original-file-name.doc
> but how do I return the file to the client, using the original
> filename?
>
> I did this in PHP perfectly, but I don't know how to tied it all up in
> Django.
>
> Many thanks,
> Gabriel

-- 
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.

Reply via email to