Closed
Description
Gitea Version
1.15.2 built with GNU Make 4.1, go1.16.7
Git Version
not relevant
Operating System
Debian 10/x64
How are you running Gitea?
apt install / locally
Database
SQLite
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Description
When uploading a readme.md file starting with ID3 the file is mistaken for an MP3 audio file. Example content
ID3Toy
======
Read and write ID3 tags (v1.0, v1.1, v2.0, v2.3, v2.4), APE (v1, v2) and LYRICS 3 tags (v1, v2) in MP3 files.
...
(MP3 files may start with ID3 tag but shouldn't be used to identify such files to begin with, but that's another issue :) )
So my README.md files shows up as raw file:
and clicking on the file line itself shows me the audio player:
The content of the readme file is correct, verified and is just text (the example above is a direct copy from it). :)
Screenshots
Network activity snapshot
Adding a new-line at the top of the file acts as a workaround and Gitea accepts the file properly as text/md file: