Add configurable archive name template for multi-file uploads#236
Open
thmmsn wants to merge 1 commit intotimvisee:masterfrom
Open
Add configurable archive name template for multi-file uploads#236thmmsn wants to merge 1 commit intotimvisee:masterfrom
thmmsn wants to merge 1 commit intotimvisee:masterfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multi-file uploads default to
Send-Archive.zip, causingSend-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.
.zipis appended automatically; unknowntokens are left literal so typos stay visible.