|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using ByteSizeLib;
|
|
|
|
|
using System;
|
|
|
|
|
using ByteSizeLib;
|
|
|
|
|
|
|
|
|
|
namespace DiscordChatExporter.Core.Models
|
|
|
|
|
{
|
|
|
|
@ -14,10 +15,14 @@ namespace DiscordChatExporter.Core.Models
|
|
|
|
|
|
|
|
|
|
public int? Height { get; }
|
|
|
|
|
|
|
|
|
|
public bool IsImage => Width != null;
|
|
|
|
|
|
|
|
|
|
public string FileName { get; }
|
|
|
|
|
|
|
|
|
|
public bool IsImage => FileName.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase) ||
|
|
|
|
|
FileName.EndsWith(".jpeg", StringComparison.OrdinalIgnoreCase) ||
|
|
|
|
|
FileName.EndsWith(".png", StringComparison.OrdinalIgnoreCase) ||
|
|
|
|
|
FileName.EndsWith(".gif", StringComparison.OrdinalIgnoreCase) ||
|
|
|
|
|
FileName.EndsWith(".bmp", StringComparison.OrdinalIgnoreCase);
|
|
|
|
|
|
|
|
|
|
public ByteSize FileSize { get; }
|
|
|
|
|
|
|
|
|
|
public Attachment(string id, int? width, int? height, string url, string fileName, ByteSize fileSize)
|
|
|
|
|