2026-10-01 12:22:08 +02:00
|
|
|
namespace PrivaPub.Domain.Media
|
|
|
|
|
{
|
|
|
|
|
public class MediaOptions
|
|
|
|
|
{
|
|
|
|
|
public string Root { get; set; }
|
|
|
|
|
public long MaxImageBytes { get; set; } = 16 * 1024 * 1024;
|
|
|
|
|
public long MaxVideoBytes { get; set; } = 99 * 1024 * 1024;
|
|
|
|
|
public long MaxProxiedBytes { get; set; } = 40 * 1024 * 1024;
|
|
|
|
|
public long ProxyCacheBytes { get; set; } = 5L * 1024 * 1024 * 1024;
|
|
|
|
|
public int MaxImageSide { get; set; } = 4096;
|
|
|
|
|
public int PreviewSide { get; set; } = 640;
|
2026-10-07 10:48:44 +02:00
|
|
|
public long MaxPixels { get; set; } = 40_000_000;//an image (or a GIF's frames together) may not decode to more
|
|
|
|
|
public int MaxFrames { get; set; } = 500;
|
|
|
|
|
public int MaxGifSide { get; set; } = 1280;//a GIF becomes an mp4 at most this wide
|
|
|
|
|
public int Concurrency { get; set; } = 2;//uploads processed at once
|
2026-10-07 10:48:56 +02:00
|
|
|
public long MaxVideoPixels { get; set; } = 2_304_000;//a larger video is made smaller (as Mastodon's video_matrix_limit)
|
|
|
|
|
public double MaxFrameRate { get; set; } = 60;
|
|
|
|
|
public int MaxSeconds { get; set; } = 3600;//audio or video may not last longer
|
2026-10-07 11:03:25 +02:00
|
|
|
public long QuotaBytesPerRoot { get; set; }//what a login's media may take (0: no quota)
|
2026-10-01 12:22:08 +02:00
|
|
|
}
|
|
|
|
|
}
|