fix some helper / viewer issues

This commit is contained in:
Ross
2020-08-16 13:38:08 +01:00
parent c5c39bb223
commit 03c88f811e
3 changed files with 20 additions and 14 deletions
-10
View File
@@ -19,16 +19,6 @@ export function shuffleArray(array) {
return array;
}
export function urltoFile(url, filename, mimeType) {
return fetch(url)
.then(function (res) {
return res.arrayBuffer();
})
.then(function (buf) {
return new File([buf], filename, { type: mimeType });
});
}
export function formatBytes(bytes, decimals = 2) {
if (bytes === 0) return "0 Bytes";