rustfs icon indicating copy to clipboard operation
rustfs copied to clipboard

Bug: Downloading a .blockmap file with MIME type application/gzip results in incorrect .gz file extension

Open Beiluola opened this issue 1 month ago • 3 comments

Describe the bug

When clicking the download button for a file that has the MIME type application/gzip but should have the .blockmap file extension, the downloaded file's extension is incorrectly changed to .gz instead of preserving the original .blockmap extension. This misleads users and may prevent the file from being recognized correctly by its intended application, as .blockmap files have a specific purpose.

To Reproduce Steps to reproduce the behavior:

  1. Run docker run -d --name rustfs-demo -p 8000:9000 -p 8001:9001 -v /srv/rustfs-demo/data:/data rustfs/rustfs:latest --address :9000 --console-enable /data.
  2. Using the @aws-sdk/client-s3 to upload a file with the type application/gzip and the extension .blockmap.
  3. Click the download button/link.
  4. Saved as a .gz file after download.

Expected behavior Do not modify the file name.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Ubuntu 24.04.2 LTS
  • Browser: Microsoft Edge, Version 142.0.3595.53 (Official build) (arm64)
  • Rustfs Version: 1.0.0-alpha.67

Beiluola avatar Nov 07 '25 09:11 Beiluola

Thank you for your feedback. We will check the reasons.

loverustfs avatar Nov 07 '25 20:11 loverustfs

Hi @Beiluola ,

Is it normal after you unzip the compressed file?

loverustfs avatar Nov 09 '25 02:11 loverustfs

Hi @Beiluola ,

Is it normal after you unzip the compressed file?

Based on my observation, the binary data of the file is valid and intact. The issue is solely with the incorrect file extension and is unrelated to decompression.

I believe the issue stems from this file's type being application/gzip. I tested and found that if I set the file type to application/octet-streamwhen uploading via the API, the incorrect extension problem does not occur upon download.

Beiluola avatar Nov 09 '25 07:11 Beiluola

@Beiluola

This bug has been fixed.

https://github.com/rustfs/rustfs/issues/813

loverustfs avatar Dec 03 '25 13:12 loverustfs

This issue should be resolved in v1.0.0-alpha.71. Please update and verify.

If it works, please close the issue. Otherwise, please comment below with more logs.

https://github.com/rustfs/rustfs/releases/tag/1.0.0-alpha.71

loverustfs avatar Dec 03 '25 13:12 loverustfs