added JSDoc
This commit is contained in:
parent
1c274768a7
commit
71b0654ce7
1 changed files with 8 additions and 1 deletions
|
|
@ -22,6 +22,10 @@ export class DownloadFilesService {
|
||||||
this.listAllFiles();
|
this.listAllFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads all files and then lists them.
|
||||||
|
* @param {string} docID - The document ID under which the files are to be saved.
|
||||||
|
*/
|
||||||
loadAllFiles(docID: string) {
|
loadAllFiles(docID: string) {
|
||||||
const storage = getStorage();
|
const storage = getStorage();
|
||||||
for (const file of this.uploadFiles) {
|
for (const file of this.uploadFiles) {
|
||||||
|
|
@ -32,6 +36,9 @@ export class DownloadFilesService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists all files in 'chatFiles' and updates the downloaded files.
|
||||||
|
*/
|
||||||
listAllFiles() {
|
listAllFiles() {
|
||||||
const storage = getStorage();
|
const storage = getStorage();
|
||||||
const listRef2 = ref(storage, 'chatFiles');
|
const listRef2 = ref(storage, 'chatFiles');
|
||||||
|
|
@ -57,7 +64,7 @@ export class DownloadFilesService {
|
||||||
this.downloadedFiles.next(downloadedFilesData);
|
this.downloadedFiles.next(downloadedFilesData);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('Fehler beim Abrufen der Dateien:', error);
|
console.error('Error when retrieving the files:', error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue