Skip to content
Snippets Groups Projects
Commit 2b185014 authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Fixed timing error, where this would be undefined

parent 977a83a7
No related branches found
No related tags found
1 merge request!1Filehandling overwrite dialog
Pipeline #12532 passed
......@@ -392,15 +392,18 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
let path = directory + "/" + file.name;
// https://github.com/perry-mitchell/webdav-client#putfilecontents
let ret = false;
let that = this;
let contents = await this.webDavClient
.putFileContents(path, file, { overwrite: false, onUploadProgress: progress => {
console.log(`Uploaded ${progress.loaded} bytes of ${progress.total}`);
}}).then(function() {
this.loading = false;
this.statusText = "";
that.loading = false;
that.statusText = "";
console.log("try finished");
console.log("after one file finished");
this.fileList.shift();
that.fileList.shift();
console.log("FileList: ", this.fileList);
this.uploadFile(directory);
}).catch(error => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment