Hello,
I am using Gitea 1.9.4 release version. I tried to upload a .zip file(only few KByte) to an issue comment, the Gitea replies wrong file type. What should I do to upload a file as that type?
Many Thanks.
Hello,
I am using Gitea 1.9.4 release version. I tried to upload a .zip file(only few KByte) to an issue comment, the Gitea replies wrong file type. What should I do to upload a file as that type?
Many Thanks.
You need to enable zip files in app.ini
. For example (this enables more than zip files):
[attachment]
ENABLED = true
; MAX_SIZE is in MB
MAX_SIZE = 2
MAX_FILES = 10
; user | as separator for allowed MIME types
ALLOWED_TYPES = image/jpeg|image/png|application/zip|application/gzip|application/pdf|application/gzip|application/x-gzip|application/x-gtar|application/x-tgz|application/x-compressed-tar|text/plain
To enable a file type you need to know their MIME type, not their file extension (e.g. text/plain
vs. .txt
). You can use this list as a guide.