[x]
):When trying to attach a .tar.gz file (or other *.gz files), the icon shown for the uploaded file shows a cross sign and the tooltip says "file type is not allowed", and the file is then consequently ignored when creating or updating a release.
On a related note, the upload dialog presented by the browser per default only accepts .png, .jpg, .zip and .gz files (with the latter then being rejected in a second step, as described above). I don't think that limitation is reasonable, as one may want to attach any type of artifacts to a release, e.g. executables. Not sure if that qualifies for a separate issue.
There are multiple content types for tar.gz and only one is allowed by default. To allow others need to add them to allowed list in app.ini
With this
[attachment]
ALLOWED_TYPES = application/gzip|application/x-gzip|application/x-gtar|application/x-tgz
in custom/conf/app.ini
, I can indeed upload a foo.tar.gz
, but still not a foo.tgz
. What would be the mime-type for that?
But more interestingly, what is the instance labeling the uploaded file with a mime-type - is that my browser? And if so, how can I see what mime-type it thinks some file has?
In windows it's in registry, Linux /usr/share/applications/*.desktop files
Ok, the mime-type I had to use for .tgz
is application/x-compressed-tar
.
Obviously that's not Gitea's fault, so I'm going to close the issue. I'd like to see a more user-friendly way of configuring this, but I currently don't have an idea how that would look like.
Most helpful comment
Ok, the mime-type I had to use for
.tgz
isapplication/x-compressed-tar
.Obviously that's not Gitea's fault, so I'm going to close the issue. I'd like to see a more user-friendly way of configuring this, but I currently don't have an idea how that would look like.