started to download.
Problem is - way of file transfer. I got something like:
response = HttpResponse(open('/way/to/file/test.rar'),
mimetype='application/x-rar-compressed')
response['Content-Disposition'] = 'attachment;
filename=archive.rar'
return response
and it works fine on my desktop, but I don't know how it will go on
server with large files.
On 28 июл, 17:51, Christoph <christophsieden...@gmail.com> wrote:
> Hi Artem,
>
> I don't know about it specifically but I have one possible solution.
> That may not be what you want and I'd like to hear critique on it:
>
> Have a model with fields id (or url or slug), status and filename (and
> more if you wish).
> This could be filled with: id=42, status=no_downloads_yet,
> filename="pictures.zip"
> Create urls that point to a view. Like this:www.mypage.foo/download/42
> A view would be called in which the status is tested and if
> appropriate the file is returned. The status should then be changed.
> (Shortcoming: I don't know off-hand how to test whether a download was
> completed or dropped or the like.)
>
> Comments welcome!
>
> Best regards,
> Christoph
>
> On 27 Jul., 22:55, Artem <pkeeper.sh...@mail.ru> wrote:
>
>
>
> > Is there any painless way to make Django able to serve files with one-
> > time urls, like in RapidShare?
> > First thought - use django.views.static.serve with some tweeks. But is
> > there a way to track status of download (dropped\complited)?
>
> > Thanks
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment