From 9a34daa2bc2d3d0a2a1ebadb419b916c7ba1bedd Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 15 Jan 2023 05:14:16 +0100 Subject: [PATCH] Set `accept` attribute to `image/*` in ImageUpload (#989) That way, browsers will suggest to the users to upload an image file instead of any kind of file. The behaviour is in-line with Element's, which specifies the same attribute when selecting an avatar. Please note that it does not prevent users from uploading non-image files as avatars, as browsers interpret that attribute as a mere suggestion, which can be bypassed in the file select dialog. Partially fixes #982. --- src/app/molecules/image-upload/ImageUpload.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/molecules/image-upload/ImageUpload.jsx b/src/app/molecules/image-upload/ImageUpload.jsx index 34d0d4b..53fc7e1 100644 --- a/src/app/molecules/image-upload/ImageUpload.jsx +++ b/src/app/molecules/image-upload/ImageUpload.jsx @@ -74,7 +74,7 @@ function ImageUpload({ {uploadPromise ? 'Cancel' : 'Remove'} )} - + ); }