<div class="file-uploader">
    <div
        class="file-uploader-container"
        {% if uploaded_files %}
            data-files='{{ uploaded_files }}'
        {% endif %}
    >
        {{ input }}
    </div>
    {% if existing_files %}
        <ul class="existing-files">
            {% for f in existing_files %}
                <li>
                    <span>{{ f.name }}</span>
                    {% if f.view_url %}
                        <a href="{{ f.view_url }}">View</a>
                    {% endif %}
                    {% if f.delete_url %}
                        <a class="delete" href="{{ f.delete_url }}">Delete</a>
                    {% endif %}
                </li>
            {% endfor %}
        </ul>
    {% endif %}
</div>
