On 23-Feb-09, at 1:44 PM, Katja Loeffler wrote: > I have been looking for a solution to make a file download with prior > authentication ...
> > But this is not really "protected" since they can make the link public > once they have it and everyone can download without prior login. > > I have used: > (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', > {'document_root': '/path/to/media'}) You don't really want use django.views.static.serve in the real world anyway, you want to use Apache. And for Apache there is an Authentication handler for mod_python that allows you to authenticate a request for a static file. http://docs.djangoproject.com/en/dev/howto/apache-auth/ Other webservers and tools may vary. -- Andy McKay ClearWind Consulting: www.clearwind.ca Blog: www.agmweb.ca/blog/andy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---