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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user