Skip to content

fix: preserve object MIME types and download names - #238

Merged
cxymds merged 1 commit into
mainfrom
cxymds/fix-object-mime-download
Sep 20, 2026
Merged

cxymds merged 1 commit into
mainfrom
cxymds/fix-object-mime-download

Conversation

@cxymds

@cxymds cxymds commented Sep 20, 2026

Copy link
Copy Markdown
Member

Description

Uploading files through the Console could persist a browser's generic MIME type even when the object name provided a more specific type. This caused archive objects such as test.tar.xz to be stored as application/x-compressed, and direct browser downloads could be saved with the wrong extension. The upload resolver now uses shared filename MIME inference when the browser type is generic, including compound archive suffixes, while preserving specific browser types. Download-only presigned URLs now request an explicit RFC 5987 attachment filename without changing preview or share URLs.

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (breaking change)
  • Documentation update
  • Code refactoring
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed
pnpm type-check
pnpm lint
pnpm format:check
pnpm test:run

All checks passed; the test suite reported 599 passing tests.

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

Closes rustfs/rustfs#8027

Screenshots (if applicable)

N/A: this change affects upload metadata and download response headers; no new visual UI is introduced.

Additional Notes

The server continues to preserve explicitly supplied S3 metadata. Only download actions request response-content-disposition; preview and shared temporary URLs retain their existing inline behavior.

@cxymds
cxymds merged commit 6234dc5 into main Sep 20, 2026
10 checks passed
@cxymds
cxymds deleted the cxymds/fix-object-mime-download branch September 20, 2026 08:08
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.

After uploading a .tar.xz file via the web client, the downloaded file extension is incorrectly changed to .tgz

1 participant