mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 11:58:41 +00:00
11 lines
313 B
TypeScript
11 lines
313 B
TypeScript
'use server';
|
|
import { writeFile } from 'node:fs/promises';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
|
|
export async function saveFile(binary: any) {
|
|
const data = new Uint8Array(binary);
|
|
await writeFile(__dirname + 'pages' + '/binary', data);
|
|
}
|