1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

Limit avatar upload to valid image files (#24258)

This causes the browser to allow only valid images in the file picker by
default.

---------

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
JakobDev 2023-04-21 23:58:59 +02:00 committed by GitHub
parent 20b6ae0e53
commit 02119ec95e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -91,7 +91,7 @@
{{.CsrfTokenHtml}}
<div class="inline field">
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
<input name="avatar" type="file" >
<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
</div>
<div class="field">

View file

@ -60,7 +60,7 @@
{{.CsrfTokenHtml}}
<div class="inline field">
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
<input name="avatar" type="file" >
<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
</div>
<div class="field">

View file

@ -123,7 +123,7 @@
<div class="inline field">
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
<input name="avatar" type="file" >
<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
</div>
<div class="field">