misc fixes:

- don't attempt to resolve sourceUrl (breaks file urls)
- pass blob to loader
- add exact size progress update, if available
- google drive loader: switch to manual auth for any error
This commit is contained in:
Ilya Kreymer
2020-06-10 08:35:02 -07:00
parent 6ed0e510e2
commit b6f70975be
7 changed files with 63 additions and 38 deletions
+4 -2
View File
@@ -39,7 +39,9 @@ class Chooser extends LitElement
loadInfo.loadUrl = url.href;
} else {
loadInfo.loadUrl = URL.createObjectURL(this.file);
loadInfo.blob = this.file;
}
loadInfo.size = this.file.size;
loadInfo.noCache = this.file.path !== undefined;
loadInfo.name = this.fileDisplayName;
}
@@ -125,11 +127,11 @@ class Chooser extends LitElement
<p class="control is-expanded">
<input class="file-name input" type="text"
name="filename" id="filename"
pattern="((file|http|https|s3):\/\/.*\.(warc|warc.gz|har|zip|wacz))|(googledrive:\/\/.+)"
pattern="((file|http|https|s3):\/\/.*\.(warc|warc.gz|zip|wacz))|(googledrive:\/\/.+)"
.value="${this.fileDisplayName}"
@input="${this.onInput}"
autocomplete="off"
placeholder="Enter a URL or click 'Choose File' to select a (WARC, HAR, WBN, or WACZ) archive source">
placeholder="Enter a URL or click 'Choose File' to select a WARC or WACZ archive source">
</p>
<div class="control">
<button type="submit" class="button is-hidden-mobile is-primary">Load</button>