mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-26 06:52:45 +00: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:
parent
20b6ae0e53
commit
02119ec95e
|
@ -91,7 +91,7 @@
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
|
<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>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
|
<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>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
|
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
|
<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>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
Loading…
Reference in a new issue