www: fix loading frames when using file from example or url.

This commit is contained in:
Alf
2021-09-29 18:34:52 -07:00
parent 94f3c6ad80
commit eb3579d9a8

View File

@@ -121,9 +121,9 @@ export default {
} }
xhr.onload = (event) => { xhr.onload = (event) => {
this.progress = 100; this.progress = 100;
const file = new File([event.target.response], "file"); this.file = new File([event.target.response], "file");
this.size = file.size; this.size = this.file.size;
this.$worker.postMessage([ 'get_file_info', file ]); this.$worker.postMessage([ 'get_file_info', this.file ]);
setTimeout(() => { this.showProgress = false; }, 2000); setTimeout(() => { this.showProgress = false; }, 2000);
} }
xhr.open('GET', this.url, true); xhr.open('GET', this.url, true);