{# File Dropzone Component Parameters: - id: Unique ID for the dropzone (required) - name: Form field name (required) - label: Label text (default: 'File') - accept_label: Text showing accepted formats (default: 'PNG, JPG, PDF up to 5MB') - max_size: Max file size in bytes (default: 5MB) - allowed_types: Array of MIME types (default: images + pdf) - existing_url: URL of existing file (optional) - existing_name: Name of existing file (optional) - is_image: Whether existing file is an image (optional) #} {% set id = id|default('file-dropzone') %} {% set label = label|default('File') %} {% set accept_label = accept_label|default('PNG, JPG, PDF up to 5MB') %} {% set max_size = max_size|default(5 * 1024 * 1024) %} {% set allowed_types = allowed_types|default(['image/png', 'image/jpeg', 'image/jpg', 'image/webp', 'application/pdf']) %}
{# Drop zone prompt #}

Drag & drop your file here

or browse to upload

{{ accept_label }}

{# Loading indicator #} {# Preview container #}
Preview

{{ existing_name|default('Current file') }}

{% if existing_url is defined and existing_url %} View | {% endif %}
{# Error message #} {# Hidden file input #}