diff --git a/packages/file-handling/src/dbp-nextcloud-file-picker.js b/packages/file-handling/src/dbp-nextcloud-file-picker.js index 20e966914176712c6e0475dd3ce437dae58715b4..aff565ddd2d509983398a83625ac2b61070441a4 100644 --- a/packages/file-handling/src/dbp-nextcloud-file-picker.js +++ b/packages/file-handling/src/dbp-nextcloud-file-picker.js @@ -357,7 +357,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { " </d:prop>" + "</d:propfind>"}) .then(contents => { - console.log("------", contents); + //console.log("------", contents); this.loading = false; this.statusText = ""; this.tabulatorTable.setData(contents.data); diff --git a/packages/file-handling/src/file-sink.js b/packages/file-handling/src/file-sink.js index 83eda1565b324e1ad115739f0dd09c3e1252bc87..027cbf5386f11e537595de93bb57d9c4d94a689a 100644 --- a/packages/file-handling/src/file-sink.js +++ b/packages/file-handling/src/file-sink.js @@ -197,6 +197,9 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) { if (this.defaultSink !== '' && this.firstOpen) { this.activeDestination = this.defaultSink; this.nextcloudDir = this.nextcloudDefaultDir; + if (this._('#nextcloud-file-picker').webDavClient !== null) { + this._('#nextcloud-file-picker').loadDirectory(this.nextcloudDefaultDir); + } this.firstOpen = false; } } diff --git a/packages/file-handling/src/file-source.js b/packages/file-handling/src/file-source.js index 13e018a27dbcc2067627606aaf8efdd939aa478e..65cbd053b7a6e118e9cc72c47108a75648ab8bfd 100644 --- a/packages/file-handling/src/file-source.js +++ b/packages/file-handling/src/file-source.js @@ -350,7 +350,7 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) { const filePicker = this._('#modal-picker'); - // check if element is already in the dom (for example if "dialog-open" attribute is set) + // check if element is already^ in the dom (for example if "dialog-open" attribute is set) if (filePicker) { MicroModal.show(filePicker, { disableScroll: true, @@ -364,6 +364,9 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) { if (this.defaultSink !== '' && this.firstOpen) { this.activeDestination = this.defaultSink; this.nextcloudDir = this.nextcloudDefaultDir; + if (this._('#nextcloud-file-picker').webDavClient !== null) { + this._('#nextcloud-file-picker').loadDirectory(this.nextcloudDefaultDir); + } this.firstOpen = false; } }