{# Upload form. Two modes: - default: HTMX multipart POST → /files. Drag&drop into the dashed area. - presign: legacy flow driven by flask.s3viewer.core.js, which still owns multi-file presigned PUTs to S3 (deferred to v1.1 for a slim rewrite). The presign branch preserves the old DOM IDs that core.js looks up. #} {%- set current_prefix = current_prefix if current_prefix is defined else request.args.get('prefix', '') -%} {%- set current_search = current_search if current_search is defined else request.args.get('search', '') -%} {% if FS3V_UPLOAD_TYPE == 'presign' %}
{# Legacy presign multi-upload still lives in flask.s3viewer.core.js. The default mode doesn't need this script, so we only load it under presign. #}

Upload files

Drop files here or select from disk

{# core.js writes the percent to #fs3viewer_progress.value via onchange. #} {# core.js's __addRefreshingBadge writes to fs3viewer_refresh.value to bump the (now-removed) badge counter. Keep a stub element so the legacy code path doesn't throw "Cannot read properties of null". #}
{# Hidden mkdir form is shared across both modes. #} {% else %}

Upload files

Drop files here or select from disk

{# Hidden form used by the New Folder button. POST with only `prefix` (no files[]) reaches the mkdir branch in view.py. #}
{% endif %}