Video attachment support!

This commit is contained in:
Madeline
2022-10-04 19:22:50 +11:00
parent 7db5c02189
commit 73923e269a
4 changed files with 118 additions and 8 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export class FileStorage implements Storage {
async set(path: string, value: any) {
path = getPath(path);
if (!fs.existsSync(dirname(path))) fs.mkdirSync(dirname(path));
if (!fs.existsSync(dirname(path))) fs.mkdirSync(dirname(path), { recursive: true });
value = Readable.from(value);
const cleaned_file = fs.createWriteStream(path);