Add thumbnails to albums

This commit is contained in:
Skia
2016-11-30 09:28:22 +01:00
parent 7e335cfbd7
commit 7453b857fb
5 changed files with 19 additions and 11 deletions

View File

@ -26,7 +26,7 @@ def send_file(request, file_id, file_class=SithFile, file_attr="file"):
iterator for chunks of 8KB.
"""
f = file_class.objects.filter(id=file_id).first()
if f is None or f.is_folder:
if f is None or not f.file:
return not_found(request)
from counter.models import Counter
if not (can_view(f, request.user) or