mirror of
https://github.com/cinnyapp/cinny.git
synced 2024-11-20 06:49:52 +01:00
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.
This commit is contained in:
parent
e5e3f5f0a3
commit
9a34daa2bc
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ function ImageUpload({
|
|||
<Text variant="b3">{uploadPromise ? 'Cancel' : 'Remove'}</Text>
|
||||
</button>
|
||||
)}
|
||||
<input onChange={uploadImage} style={{ display: 'none' }} ref={uploadImageRef} type="file" />
|
||||
<input onChange={uploadImage} style={{ display: 'none' }} ref={uploadImageRef} type="file" accept="image/*" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue