<commit_before>{% import "AdmingeneratorGeneratorBundle:Form/SingleUpload:macros.html.twig"  as macros %}

{% set file = form.vars.data %}
{% set entity = form.parent.vars.value %}
{% set property = form.vars.name %}

<div class="{{ id ~ '_preview_image' }} download active">    
{% if file|default is not empty %}
    {% if previewImages and downloadType == 'image' %}
        {% if thumbnailGenerator is sameas('avalanche') and thumbnailFilter %}
            {% set src = vich_uploader_asset(entity, property)|apply_filter(thumbnailFilter) %}
        {% elseif item.size < previewSourceMaxFileSize %}
            {% set src = vich_uploader_asset(entity, property) %}
        {% endif %}
        <img class="img-polaroid" 
             src="{{ src }}"
             style="{{- 'max-width:'  ~ maxWidth   ~'px;' -}}
                    {{- 'max-height:' ~ maxHeight  ~'px;' -}}
                    {{- 'min-width:'  ~ minWidth   ~'px;' -}}
                    {{- 'min-height:' ~ minHeight  ~'px;' -}}" />
    {% else %}
        <div class="fileicon {{ downloadType }}">{{ ('filetype.'~downloadType)|trans({}, 'Admingenerator')|raw }}</div>
    {% endif %}
    {% if nameable|default is not empty %}<commit_msg>SingleUpload widget fix<commit_after>{% import "AdmingeneratorGeneratorBundle:Form/SingleUpload:macros.html.twig"  as macros %}

{% set file = form.vars.data %}
{% set entity = form.parent.vars.value %}
{% set property = form.vars.name %}

<div class="{{ id ~ '_preview_image' }} download active">    
{% if file|default is not empty %}
    {% if previewImages and downloadType == 'image' %}
        {% if thumbnailGenerator is sameas('avalanche') and thumbnailFilter %}
            {% set src = vich_uploader_asset(entity, property)|apply_filter(thumbnailFilter) %}
        {% else %}
            {% set src = vich_uploader_asset(entity, property) %}
        {% endif %}
        <img class="img-polaroid" 
             src="{{ src }}"
             style="{{- 'max-width:'  ~ maxWidth   ~'px;' -}}
                    {{- 'max-height:' ~ maxHeight  ~'px;' -}}
                    {{- 'min-width:'  ~ minWidth   ~'px;' -}}
                    {{- 'min-height:' ~ minHeight  ~'px;' -}}" />
    {% else %}
        <div class="fileicon {{ downloadType }}">{{ ('filetype.'~downloadType)|trans({}, 'Admingenerator')|raw }}</div>
    {% endif %}
    {% if nameable|default is not empty %}
{'fraction_non_alphanumeric': 0.18235048097030532, 'fraction_numerical': 0.0, 'mean_word_length': 2.554234769687964, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2007512', 'n_tokens_mistral': 783, 'n_tokens_neox': 713, 'n_words': 156}