Files
memegoat/backend/src/contents/dto/upload-content.dto.ts
Mathis HERRIOT f1a571196d feat: add video upload feature with support for validation and processing
- Introduced "video" as a new content type across backend and frontend.
- Updated validation schemas and MIME-type handling for video files.
- Implemented file size limits for videos (10 MB max) in configuration.
- Enhanced upload flow with auto-detection of file types (image, GIF, video).
- Expanded media processing to handle video files and convert them to WebM format.
2026-01-28 14:07:00 +01:00

31 lines
472 B
TypeScript

import {
IsArray,
IsEnum,
IsNotEmpty,
IsOptional,
IsString,
IsUUID,
MaxLength,
} from "class-validator";
import { ContentType } from "./create-content.dto";
export class UploadContentDto {
@IsEnum(ContentType)
type!: "meme" | "gif" | "video";
@IsString()
@IsNotEmpty()
@MaxLength(255)
title!: string;
@IsOptional()
@IsUUID()
categoryId?: string;
@IsOptional()
@IsArray()
@IsString({ each: true })
@MaxLength(64, { each: true })
tags?: string[];
}