Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You cannot upload files of this type. even when ALLOWED_TYPES=*/* #33669

Closed
bilogic opened this issue Feb 21, 2025 · 7 comments
Closed

You cannot upload files of this type. even when ALLOWED_TYPES=*/* #33669

bilogic opened this issue Feb 21, 2025 · 7 comments
Labels

Comments

@bilogic
Copy link
Contributor

bilogic commented Feb 21, 2025

Description

  1. I added ALLOWED_TYPES=*/*
[attachment]
PATH = /data/gitea/attachments
ALLOWED_TYPES=*/*
  1. But I still get exception when uploading *.sql.bz2 file to an issue

Gitea Version

1.23.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

official docker image

Database

None

@wxiaoguang
Copy link
Contributor

It seems that you made the change in wrong section.

[attachment]
ALLOWED_TYPES = */*

Image

@bilogic
Copy link
Contributor Author

bilogic commented Feb 21, 2025

  1. I also added under [attachment], see OP
  2. Then rebooted my container, even tried adding spaces, i.e. ALLOWED_TYPES = */*, still cannot

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Feb 21, 2025

Unable to reproduce.

Could you provide a reproducible setup with detailed steps and the config file?

Image

Image

@bilogic
Copy link
Contributor Author

bilogic commented Feb 21, 2025

My bad, I rebooted the wrong gitea instance. Resolved. Thank you!

@bilogic bilogic closed this as completed Feb 21, 2025
@bilogic
Copy link
Contributor Author

bilogic commented Feb 21, 2025

@wxiaoguang
Copy link
Contributor

It could be.

From another perspective, the list follows GitHub's upload list (see GitHub's page source):

.svg, .gif, .jpg, .jpeg, .png, .mov, .mp4, .webm, .pdf, .docx, .pptx, .xlsx, .odt, .fodt, .ods, .fods, .odp, .fodp, .odg, .fodg, .odf, .csv, .xls, .zip, .gz, .tgz, .patch, .txt, .log, .md, .json, .jsonc, .cpuprofile, .dmp

I think the reason is that zip could be used cross-OS, but Windows users can't really open bz2 or 7z by default.

@bilogic
Copy link
Contributor Author

bilogic commented Feb 21, 2025

Agree thanks, following GitHub is easier, and probably safer. :) Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants