Skip to content

Commit 96b8df9

Browse files
author
Anton A. Sumin
committed
Fixed uploading image without thumbnail
1 parent c3d92f6 commit 96b8df9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Resources/views/Default/templates.html.twig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
<script type="text/template" id="file-uploader-file-template">
3232
<li data-name="<%- name %>" class="thumbnail">
3333
{# Some things can be thumbnailed, some things not #}
34-
{# ACHTUNG: regular expression literals fail in Underscore templates #}
35-
<% if (url.match(new RegExp('(\.gif|\.jpg|\.jpeg|\.png)$', 'i'))) { %>
34+
<% if ('undefined' != typeof thumbnail_url) { %>
3635
<img src="<%- thumbnail_url %>" class="thumbnail-image" />
3736
<% } %>
3837
<div class="caption">

0 commit comments

Comments
 (0)