Thumbnails for images and videos #87
@ -20,7 +20,7 @@ def scan_selected_files(self, request, queryset):
|
||||
|
||||
|
||||
def make_thumbnails(self, request, queryset):
|
||||
"""Schedule thumbnails generationg for selected files."""
|
||||
"""Schedule thumbnails generation for selected files."""
|
||||
for instance in queryset.filter(type__in=(File.TYPES.IMAGE, File.TYPES.VIDEO)):
|
||||
files.tasks.make_thumbnails(file_id=instance.pk)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
{# alert about unexpected size of the default thumbnail, which might happen if source file was smaller than 1080p #}
|
||||
{# TODO: do we want to make minimum resolusion a validation criteria during upload instead? #}
|
||||
{# TODO: do we want to make minimum resolution a validation criteria during upload instead? #}
|
||||
{% if file.thumbnail.width != THUMBNAIL_SIZE_L.0 or file.thumbnail.height != THUMBNAIL_SIZE_L.1 %}
|
||||
<p>
|
||||
<b class="icon-alert">⚠</b> Expected {{ THUMBNAIL_SIZE_L.0 }}x{{ THUMBNAIL_SIZE_L.1 }}px,
|
||||
|
Loading…
Reference in New Issue
Block a user