Proper handling of moderator clearing files and sharing same file twice. Fixes #257

This commit is contained in:
Håvar Aambø Fosstveit
2020-04-30 23:06:02 +02:00
parent de413fb670
commit 3de8555c10
2 changed files with 31 additions and 6 deletions
@@ -36,7 +36,7 @@ const FileSharing = (props) =>
{
if (event.target.files.length > 0)
{
props.roomClient.shareFiles(event.target.files);
await props.roomClient.shareFiles(event.target.files);
}
};
@@ -65,6 +65,8 @@ const FileSharing = (props) =>
type='file'
disabled={!canShare}
onChange={handleFileChange}
// Need to reset to be able to share same file twice
onClick={(e) => (e.target.value = null)}
id='share-files-button'
/>
<label htmlFor='share-files-button'>