Include Authorization header for streaming uploads

This commit is contained in:
Kieran 2022-09-11 21:27:48 +01:00
parent 2b5fbf3ce3
commit 78c2b560b9
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -96,7 +96,9 @@ export function FileUpload(props) {
if (encrypt) {
headers["V-EncryptionParams"] = JSON.stringify(enc.getParams());
}
if (auth) {
headers["Authorization"] = `Bearer ${auth}`;
}
let req = await fetch("/upload", {
method: "POST",
mode: "cors",