improve media mime type inferring + added uploadToEntity in media api

This commit is contained in:
dswbx
2025-02-14 18:02:43 +01:00
parent 4bd201d454
commit fb76f8d789
12 changed files with 147 additions and 69 deletions

View File

@@ -17,5 +17,6 @@ export function getRandomizedFilename(file: File | string, length = 16): string
throw new Error("Invalid file name");
}
// @todo: use uuid instead?
return [randomString(length), getExtension(filename)].filter(Boolean).join(".");
}