This commit is contained in:
syuilo 2025-08-11 12:01:32 +09:00
parent f242892382
commit 1d8e183883
1 changed files with 2 additions and 1 deletions

View File

@ -190,7 +190,8 @@ export async function uploadFile(
path = '../../test/resources/192.jpg', path = '../../test/resources/192.jpg',
): Promise<Misskey.entities.DriveFile> { ): Promise<Misskey.entities.DriveFile> {
const filename = path.split('/').pop() ?? 'untitled'; const filename = path.split('/').pop() ?? 'untitled';
const blob = new Blob([await readFile(join(__dirname, path))]); const buffer = await readFile(join(__dirname, path));
const blob = new Blob([new Uint8Array(buffer)]);
const body = new FormData(); const body = new FormData();
body.append('i', user.i); body.append('i', user.i);