remove some unused styles

This commit is contained in:
2020-02-11 13:58:19 +01:00
parent 045b8959a0
commit 99cf91fcee
5 changed files with 7 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
function UploadManager(apiAddress, uploadsFinished) {
this.apiAddress = apiAddress;
function UploadManager(uploadEndpoint, uploadsFinished) {
this.uploadEndpoint = uploadEndpoint;
// Callback function for when the queue is empty
this.uploadsFinished = uploadsFinished;
@@ -99,11 +99,10 @@ UploadManager.prototype.uploadThread = function() {
console.debug("Starting upload of " + job.name);
let form = new FormData();
form.append("name", job.name);
form.append('file', job.file);
let xhr = new XMLHttpRequest();
xhr.open("POST", this.apiAddress + "/file", true);
xhr.open("POST", this.uploadEndpoint, true);
xhr.timeout = 21600000; // 6 hours, to account for slow connections
// Report progress updates back to the caller

View File

@@ -31,10 +31,9 @@ let uploadsStr = localStorage.getItem("uploaded_files")
if (uploadsStr === null) { uploadsStr = "" }
let uploads = Array()
if (uploadsStr != "") {
uploadsStr = uploadsStr.slice(0, -1) // Strip the trailing comma
uploads = uploadsStr.split(",")
// Strip the trailing comma
uploads = uploadsStr.slice(0, -1).split(",")
}
// Get the uploads from a cookie

View File

@@ -75,7 +75,7 @@ let shareLink = ""
function handleUploads(files) {
if (uploader === null){
uploader = new UploadManager(apiEndpoint, uploadsFinished)
uploader = new UploadManager(apiEndpoint+"/file", uploadsFinished)
}
if (files.length === 0) {

View File

@@ -9,7 +9,7 @@ function uploadText() {
return;
}
new UploadManager(apiEndpoint, null).addFile(
new UploadManager(apiEndpoint+"/file", null).addFile(
blob,
filename,
null,