mirror of
https://github.com/Govor-team/Govor.git
synced 2026-11-16 20:56:03 +00:00
55cc9538f7
Enforce upload limits and safer media metadata, validate attachment ownership and encrypted-message references, and make message attachment binding idempotent. Add gallery media round-trip coverage and a regression test for closing older sessions.
20 lines
570 B
C#
20 lines
570 B
C#
using Govor.Domain.Models;
|
|
using Govor.Domain.Models.Messages;
|
|
using Microsoft.AspNetCore.Http;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Govor.Contracts.Requests;
|
|
|
|
public class MediaUploadRequest
|
|
{
|
|
[Required]
|
|
public IFormFile FromFile { get; set; }
|
|
[Required]
|
|
public MediaType Type { get; set; }
|
|
[Required, MaxLength(128)]
|
|
public string MimeType { get; set; } = string.Empty;
|
|
public string? EncryptedKey { get; set; } = string.Empty;
|
|
[Required]
|
|
public MediaOwnerType OwnerType { get; set; } = MediaOwnerType.Message;
|
|
}
|