diff --git a/controller/media.ts b/controller/media.ts index ceb43b8..2d9d98f 100644 --- a/controller/media.ts +++ b/controller/media.ts @@ -8,8 +8,8 @@ import {bucket} from "./bucket"; * @param assetName The name of the asset * @param assetEnding The file ending of the asset */ -export const createMedia = (clientId: number, assetName: string, assetEnding: string) => - Media.create({clientId, assetName, assetEnding}); +export const createMedia = (clientId: number, assetName: string, assetEnding: string | undefined) => + Media.create({clientId, assetName, assetEnding: assetEnding || "txt"}); /** * Gets a media object by the asset id