forked from FoundKeyGang/FoundKey
fix: uploadFile when folder is undefined
In uploadFile, folder can be undefined when uploading to the parent folder.
This commit is contained in:
parent
2209490cc8
commit
7abad139f8
1 changed files with 2 additions and 2 deletions
|
@ -29,11 +29,11 @@ const mimeTypeMap = {
|
|||
|
||||
export function uploadFile(
|
||||
file: File,
|
||||
folder?: any,
|
||||
folder?: string | Record<string, any>,
|
||||
name?: string,
|
||||
keepOriginal: boolean = defaultStore.state.keepOriginalUploading,
|
||||
): Promise<Misskey.entities.DriveFile> {
|
||||
const folderId = typeof folder === 'string' ? folder : folder.id;
|
||||
const folderId = typeof folder === 'string' ? folder : folder?.id;
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const id = Math.random().toString();
|
||||
|
|
Loading…
Reference in a new issue