forked from FoundKeyGang/FoundKey
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:
parent
71b3b5a60c
commit
508cb00147
1 changed files with 1 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue