Added persistent storage permissions when uploading maps or tokens

This commit is contained in:
Mitchell McCaffrey
2020-11-27 21:00:08 +11:00
parent 951c515334
commit 926f05f301
3 changed files with 24 additions and 1 deletions

View File

@@ -70,6 +70,11 @@ function SelectTokensModal({ isOpen, onRequestClose }) {
}
async function handleImagesUpload(files) {
if (navigator.storage) {
// Attempt to enable persistant storage
await navigator.storage.persist();
}
for (let file of files) {
await handleImageUpload(file);
}