Question: In Debian11 does not recognize the type #161

Closed
opened 2026-01-19 18:29:14 +00:00 by michael · 14 comments
Owner

Originally created by @wc7086 on GitHub.

When running transfersh in Debian11, many formats are not recognized, but not all formats are not recognized.

image

Originally created by @wc7086 on GitHub. When running transfersh in Debian11, many formats are not recognized, but not all formats are not recognized. ![image](https://user-images.githubusercontent.com/74053663/130092654-7c60b720-31f7-41b2-abab-04714cdec440.png)
Author
Owner

@wc7086 commented on GitHub:

I cannot reproduce, could you share the file?

sample.gz
http://transfer.sh/1xqzAJ2/%E6%9E%97%E7%A9%86%20-%20%E5%B0%84%E9%9B%95%E8%8B%B1%E9%9B%84%E4%BC%A0.mp3

can you send a screenshot of the PUT request from network tab in the browser?

image

@wc7086 commented on GitHub: > I cannot reproduce, could you share the file? [sample.gz](https://github.com/dutchcoders/transfer.sh/files/7021881/sample.gz) http://transfer.sh/1xqzAJ2/%E6%9E%97%E7%A9%86%20-%20%E5%B0%84%E9%9B%95%E8%8B%B1%E9%9B%84%E4%BC%A0.mp3 > can you send a screenshot of the PUT request from network tab in the browser? ![image](https://user-images.githubusercontent.com/74053663/130243037-e4a70efd-23c5-4414-9519-3ea770a6879d.png)
Author
Owner

@wc7086 commented on GitHub:

image

I found that gz files will not show the type either.

@wc7086 commented on GitHub: ![image](https://user-images.githubusercontent.com/74053663/130245497-69373b4b-1689-474d-a429-303892cf6162.png) I found that gz files will not show the type either.
Author
Owner

@paolafrancesca commented on GitHub:

I cannot reproduce, could you share the file?
mime type is inferred by the file extension: https://github.com/dutchcoders/transfer.sh/blob/master/server/handlers.go#L513

can you send a screenshot of the PUT request from network tab in the browser?

@paolafrancesca commented on GitHub: I cannot reproduce, could you share the file? mime type is inferred by the file extension: https://github.com/dutchcoders/transfer.sh/blob/master/server/handlers.go#L513 can you send a screenshot of the PUT request from network tab in the browser?
Author
Owner

@wc7086 commented on GitHub:

how did you upload the file?

Using web upload, uploading the same file in the old version will not have this problem.

@wc7086 commented on GitHub: > how did you upload the file? Using web upload, uploading the same file in the old version will not have this problem.
Author
Owner

@paolafrancesca commented on GitHub:

how did you upload the file?

@paolafrancesca commented on GitHub: how did you upload the file?
Author
Owner

@wc7086 commented on GitHub:

I tried several formats again and found that none of them could be recognized. There is a problem with the recognition format. I use Edge 92.0.902.78.

@wc7086 commented on GitHub: I tried several formats again and found that none of them could be recognized. There is a problem with the recognition format. I use Edge `92.0.902.78`.
Author
Owner

@wc7086 commented on GitHub:

Can you try locally?

Sorry, I forgot to mention my system version. After testing. This problem seems to only reproduce on Debian 11.

@wc7086 commented on GitHub: > Can you try locally? Sorry, I forgot to mention my system version. After testing. This problem seems to only reproduce on Debian 11.
Author
Owner

@paolafrancesca commented on GitHub:

https://play.golang.org/p/wiKZKLyeLrK

on unix go reads the mime type from this set of files:
https://github.com/golang/go/blob/go1.16.7/src/mime/type_unix.go#L19-L24

without proper content of those files only these are the extension with results:
https://github.com/golang/go/blob/go1.16.7/src/mime/type.go#L60-L76

what do you have on your system?

@paolafrancesca commented on GitHub: https://play.golang.org/p/wiKZKLyeLrK on unix go reads the mime type from this set of files: https://github.com/golang/go/blob/go1.16.7/src/mime/type_unix.go#L19-L24 without proper content of those files only these are the extension with results: https://github.com/golang/go/blob/go1.16.7/src/mime/type.go#L60-L76 what do you have on your system?
Author
Owner

@wc7086 commented on GitHub:

When running transfersh in Debian11, many formats are not recognized, but not all formats are not recognized.

@wc7086 commented on GitHub: When running transfersh in Debian11, many formats are not recognized, but not all formats are not recognized.
Author
Owner

@paolafrancesca commented on GitHub:

I've tried all the files you sent me on my own instance with v1.3.0 and the type is correct.
What binary are you using?
I've installed https://github.com/dutchcoders/transfer.sh/releases/download/v1.3.0/transfersh-v1.3.0-linux-amd64
Can you try locally?

@paolafrancesca commented on GitHub: I've tried all the files you sent me on my own instance with v1.3.0 and the type is correct. What binary are you using? I've installed https://github.com/dutchcoders/transfer.sh/releases/download/v1.3.0/transfersh-v1.3.0-linux-amd64 Can you try locally?
Author
Owner

@paolafrancesca commented on GitHub:

can I close the issue @wc7086 ?

@paolafrancesca commented on GitHub: can I close the issue @wc7086 ?
Author
Owner

@wc7086 commented on GitHub:

try to install media-types package

Okay, the debian11 mirror does not include the media-types package by default. I now installed the media-types package to solve this problem.

@wc7086 commented on GitHub: > try to install `media-types` package Okay, the debian11 mirror does not include the `media-types` package by default. I now installed the `media-types` package to solve this problem.
Author
Owner

@wc7086 commented on GitHub:

what do you have on your system?

I used find / -name mime.types and I did not find mime.types in the Debian11 system.

@wc7086 commented on GitHub: > what do you have on your system? I used `find / -name mime.types` and I did not find `mime.types` in the Debian11 system.
Author
Owner

@paolafrancesca commented on GitHub:

# dpkg -S /etc/mime.types
media-types: /etc/mime.types

try to install media-types package

@paolafrancesca commented on GitHub: ``` # dpkg -S /etc/mime.types media-types: /etc/mime.types ``` try to install `media-types` package
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#161