mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 16:46:08 +02:00
feat: add attachment file size support for messages and update upload limits
This commit is contained in:
@@ -6,8 +6,9 @@ public static class HubConstants
|
||||
public const string DefaultChannel = "general";
|
||||
public const int DefaultHistoryCount = 100;
|
||||
public const int MaxMessageLength = 2000;
|
||||
public const int MaxFileSizeBytes = 10 * 1024 * 1024; // 10 MB
|
||||
public const int MaxAudioFileSizeBytes = 20 * 1024 * 1024; // 20 MB
|
||||
public const int MaxImageSizeBytes = 10 * 1024 * 1024; // 10 MB
|
||||
public const int MaxAudioFileSizeBytes = 10 * 1024 * 1024; // 10 MB
|
||||
public const int MaxFileSizeBytes = 100 * 1024 * 1024; // 100 MB
|
||||
public const int MaxAvatarSizeBytes = 2 * 1024 * 1024; // 2 MB
|
||||
public const int MaxMessageNewlines = 30;
|
||||
public const int MaxConsecutiveNewlines = 1;
|
||||
|
||||
@@ -12,6 +12,7 @@ public record MessageDto(
|
||||
string? AttachmentUrl,
|
||||
string? AttachmentFileName,
|
||||
DateTimeOffset SentAt,
|
||||
long? AttachmentFileSize = null,
|
||||
List<EmbedDto>? Embeds = null);
|
||||
|
||||
public record ChannelDto(
|
||||
|
||||
@@ -7,6 +7,7 @@ public class Message
|
||||
public MessageType Type { get; set; } = MessageType.Text;
|
||||
public string? AttachmentUrl { get; set; }
|
||||
public string? AttachmentFileName { get; set; }
|
||||
public long? AttachmentFileSize { get; set; }
|
||||
public string? EmbedJson { get; set; }
|
||||
public DateTimeOffset SentAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user