1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-03 05:36:16 +02:00

Node.js 24 support (#16723)

* Revert "テストが動かないためnodejs 24サポートを取り消し"

This reverts commit a892bbcce5.

* fix jest.js

* ファイルの添付方法を変更

---------

Co-authored-by: samunohito <46447427+samunohito@users.noreply.github.com>
This commit is contained in:
syuilo
2025-10-30 21:47:04 +09:00
committed by GitHub
parent a892bbcce5
commit a888f2863b
7 changed files with 13 additions and 7 deletions

View File

@@ -316,8 +316,12 @@ export const uploadFile = async (user?: UserToken, { path, name, blob }: UploadO
: new URL(path, new URL('resources/', import.meta.url));
const formData = new FormData();
formData.append('file', blob ??
new File([new Uint8Array(await readFile(absPath))], basename(absPath.toString())));
formData.append(
'file',
blob ?? new Blob([new Uint8Array(await readFile(absPath))]),
basename(absPath.toString()),
);
formData.append('force', 'true');
if (name) {
formData.append('name', name);