{% extends 'layouts' %} {% set title = app.name + ' - Upload file' %} {% block scripts %} {% endblock %} {% block body %}

Upload files

You are responsible for the files that you upload.

Upload a file

{{ macros.field(_locals, 'file', 'upload', '', 'Choose wisely', 'The maximum upload size is ' + max_upload_size + 'MiB', validation_attributes='required') }} {{ macros.field(_locals, 'checkbox', 'never_expire', '', 'Never delete this file') }} {{ macros.field(_locals, 'number', 'expire_after_days', '30', 'How many days to delete this file after', null, validation_attributes='max="1825"') }} {{ macros.field(_locals, 'checkbox', 'autogen_url', '', 'Generate url automatically', null, validation_attributes='checked') }} {{ macros.field(_locals, 'text', 'slug', '', 'Custom url slug', 'Example: beautiful_image.jpg sets url to https://'+default_domain+'/beautiful_image.jpg', validation_attributes='disabled') }} {{ macros.csrf(getCsrfToken) }}
{% set url = flash('url') %} {% if url | length %}
URL
{{ url }}
{% endif %}

File list

{{ macros.paginate(files.pagination, 'file-uploader', 3) }} {% for file in files %} {% else %} {% endfor %}
# Name Size Expires at Actions
{{ file.id }}
{{ file.real_name }}
{{ (file.size / (1024 * 1024)).toFixed(2) }}MB {% if file.expires_at %}{{ file.expires_at.toISOString() }}{% else %}Never{% endif %}
{% if file.shouldBeDeleted() %} Pending deletion {% else %}
{{ macros.csrf(getCsrfToken) }}
{% endif %}
You haven't uploaded any file yet.
{{ macros.paginate(files.pagination, 'file-uploader', 3) }}
{% endblock %}