Skip to content

Add configurable archive name template for multi-file uploads#236

Open
thmmsn wants to merge 1 commit intotimvisee:masterfrom
thmmsn:configurable-archive-name
Open

Add configurable archive name template for multi-file uploads#236
thmmsn wants to merge 1 commit intotimvisee:masterfrom
thmmsn:configurable-archive-name

Conversation

@thmmsn
Copy link
Copy Markdown

@thmmsn thmmsn commented Apr 22, 2026

Multi-file uploads default to Send-Archive.zip, causing
Send-Archive (1).zip, (2).zip, ... to pile up. This adds two env vars:

  • ARCHIVE_NAME_PREFIX (default: Send-Archive)
  • ARCHIVE_NAME_TEMPLATE (default: {prefix})

Placeholders: {prefix}, {filename}, {date}, {datetime},
{yyyy} {yy} {mm} {dd} {hh} {mi} {ss}.

Example: ARCHIVE_NAME_TEMPLATE={prefix}_{yyyy}{mm}{dd}_{hh}{mi}{ss}
Send-Archive_20260422_143205.zip.

Default behaviour unchanged. .zip is appended automatically; unknown
tokens are left literal so typos stay visible.

Multi-file uploads previously defaulted to "Send-Archive.zip", which
caused "Send-Archive (1).zip", "Send-Archive (2).zip", etc. to pile up
in users' download folders. This introduces two new env-configurable
options so operators can customise the archive name:

  ARCHIVE_NAME_PREFIX    (default: "Send-Archive")
  ARCHIVE_NAME_TEMPLATE  (default: "{prefix}")

The template supports the following placeholders:

  {prefix}    - ARCHIVE_NAME_PREFIX
  {filename}  - first file's basename (sanitized)
  {date}      - YYYY-MM-DD
  {datetime}  - YYYY-MM-DD-HHMM
  {yyyy} {yy} {mm} {dd} {hh} {mi} {ss}  - individual parts

The default behaviour is unchanged ("Send-Archive.zip"). Operators who
want timestamped archives can set e.g.

  ARCHIVE_NAME_TEMPLATE={prefix}_{yyyy}{mm}{dd}_{hh}{mi}{ss}

Unknown tokens are left untouched so typos are visible rather than
silently dropped. ".zip" is appended automatically when missing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant