gitea/docs/content/doc/advanced
silverwind cda44750cb
Attachments: Add extension support, allow all types for releases (#12465)
* Attachments: Add extension support, allow all types for releases

- Add support for file extensions, matching the `accept` attribute of `<input type="file">`
- Add support for type wildcard mime types, e.g. `image/*`
- Create repository.release.ALLOWED_TYPES setting (default unrestricted)
- Change default for attachment.ALLOWED_TYPES to a list of extensions
- Split out POST /attachments into two endpoints for issue/pr and
  releases to prevent circumvention of allowed types check

Fixes: https://github.com/go-gitea/gitea/pull/10172
Fixes: https://github.com/go-gitea/gitea/issues/7266
Fixes: https://github.com/go-gitea/gitea/pull/12460
Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers

* rename function

* extract GET routes out of RepoMustNotBeArchived

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-10-05 01:49:33 -04:00
..
adding-legal-pages.en-us.md
api-usage.en-us.md
api-usage.zh-cn.md
ci-cd.en-us.md Add notice for awesome-gitea (#10612) 2020-03-05 11:55:28 +02:00
cmd-embedded.en-us.md Changed image of openid-connect logo for better look on arc-green theme (#11312) 2020-05-10 17:55:22 +03:00
config-cheat-sheet.en-us.md Attachments: Add extension support, allow all types for releases (#12465) 2020-10-05 01:49:33 -04:00
config-cheat-sheet.zh-cn.md Add default storage configurations (#12813) 2020-09-29 12:05:13 +03:00
customizing-gitea.en-us.md Add mermaid JS renderer (#12334) 2020-07-27 02:24:09 -04:00
customizing-gitea.zh-cn.md Rename custom/conf/app.ini.sample to custom/conf/app.example.ini for better syntax light on editor (#11926) 2020-06-17 23:16:59 -04:00
external-renderers.en-us.md Fix external renderers example (#12841) 2020-09-14 18:11:11 -04:00
hacking-on-gitea.en-us.md Add 'make watch' (#12636) 2020-09-04 20:55:06 -04:00
hacking-on-gitea.zh-cn.md
logging-documentation.en-us.md [Docs] Logging Configuration - Use `logrotate` Instead (#9930) 2020-07-16 12:02:29 -04:00
mail-templates-us.md
make.en-us.md
make.fr-fr.md
make.zh-cn.md
migrations.en-us.md update (#10079) 2020-01-31 07:01:32 +02:00
oauth2-provider.md
repo-indexer.en-us.md Add detected file language to code search (#10256) 2020-02-20 16:53:55 -03:00
search-engines-indexation.en-us.md
signing.en-us.md Re-order GPG signing docs and fix code blocks (#10349) 2020-02-19 02:23:45 +01:00
specific-variables.en-us.md
specific-variables.zh-cn.md
third-party-tools.en-us.md Add notice for awesome-gitea (#10612) 2020-03-05 11:55:28 +02:00
third-party-tools.zh-cn.md