Unable to upload tar.gz attachment #1016

Closed
opened 2025-11-02 03:45:24 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @JKingweb on GitHub (Aug 30, 2017).

  • Gitea version (or commit ref): 1.2.0-rc1
  • Git version: N/A
  • Operating system: Ubuntu 16.04 (server), Windows 10 (client)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

The default configuration suggests one should be able to upload gzipped tarballs as attachments (application/gzip is in the allowed list), but it doesn't seem to work on any Windows browser I've tried (Vivaldi, Edge, Chrome, Firefox).

image
image

Originally created by @JKingweb on GitHub (Aug 30, 2017). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.2.0-rc1 - Git version: N/A - Operating system: Ubuntu 16.04 (server), Windows 10 (client) - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [X] SQLite - Can you reproduce the bug at https://try.gitea.io: - [X] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description The default configuration suggests one should be able to upload gzipped tarballs as attachments (application/gzip is in the allowed list), but it doesn't seem to work on any Windows browser I've tried (Vivaldi, Edge, Chrome, Firefox). ![image](https://user-images.githubusercontent.com/89590/29855259-84e80b26-8d18-11e7-9c24-90365cd3b49e.png) ![image](https://user-images.githubusercontent.com/89590/29855273-975c5668-8d18-11e7-8477-aefcd19d9198.png)
GiteaMirror added the type/question label 2025-11-02 03:45:24 -06:00
Author
Owner

@lafriks commented on GitHub (Aug 30, 2017):

You can set allowed that in app.ini file and restart gitea:
https://docs.gitea.io/en-us/config-cheat-sheet/ section Attachments

@lafriks commented on GitHub (Aug 30, 2017): You can set allowed that in app.ini file and restart gitea: https://docs.gitea.io/en-us/config-cheat-sheet/ section Attachments
Author
Owner

@JKingweb commented on GitHub (Aug 30, 2017):

As stated in my description, application/gzip should be allowed by default. I also tried adding it explicitly. Neither worked. Finally I had to change the allowed list to / to get it to work. Is there something else non-obvious that would work?

@JKingweb commented on GitHub (Aug 30, 2017): As stated in my description, application/gzip should be allowed by default. I also tried adding it explicitly. Neither worked. Finally I had to change the allowed list to */* to get it to work. Is there something else non-obvious that would work?
Author
Owner

@lafriks commented on GitHub (Aug 30, 2017):

By default only images are allowed. You have to set correct mime type as sent from browser (there are multiple for gz files)

@lafriks commented on GitHub (Aug 30, 2017): By default only images are allowed. You have to set correct mime type as sent from browser (there are multiple for gz files)
Author
Owner

@lafriks commented on GitHub (Aug 30, 2017):

Sorry I thought it is issue attachment :)

@lafriks commented on GitHub (Aug 30, 2017): Sorry I thought it is issue attachment :)
Author
Owner

@lafriks commented on GitHub (Aug 30, 2017):

Try adding application/x-gzip to allowed_type

@lafriks commented on GitHub (Aug 30, 2017): Try adding `application/x-gzip` to allowed_type
Author
Owner

@JKingweb commented on GitHub (Aug 30, 2017):

Thanks, application/x-gzip worked. It may be beneficial to have the message state the type which is being rejected, so that one doesn't have to go fumbling in the dark.

@JKingweb commented on GitHub (Aug 30, 2017): Thanks, application/x-gzip worked. It may be beneficial to have the message state the type which is being rejected, so that one doesn't have to go fumbling in the dark.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1016