client: fix drive upload

Using `addFile` here will add the file twice because the file is
also added through the streaming API handler.
This commit is contained in:
Johann150 2022-11-18 20:17:42 +01:00
parent 71b3b5a60c
commit 508cb00147
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -386,9 +386,7 @@ function onChangeFileInput() {
}
function upload(file: File, folderToUpload?: foundkey.entities.DriveFolder | null) {
uploadFile(file, (typeof folderToUpload === 'object') ? folderToUpload.id : null, undefined, keepOriginal).then(res => {
addFile(res, true);
});
uploadFile(file, folderToUpload?.id ?? null, undefined, keepOriginal);
}
function chooseFile(file: foundkey.entities.DriveFile) {