diff --git a/Server/src/SOR.Website/Pages/AiAssets/Report.cshtml b/Server/src/SOR.Website/Pages/AiAssets/Report.cshtml index c356b00..9c761d1 100644 --- a/Server/src/SOR.Website/Pages/AiAssets/Report.cshtml +++ b/Server/src/SOR.Website/Pages/AiAssets/Report.cshtml @@ -3,6 +3,25 @@ @{ ViewData["Title"] = "AI Asset Report"; ViewData["MetaDescription"] = "Full searchable report of AI-assisted assets in Aeternalis."; + + string AssetType(string? contentType) + { + if (string.IsNullOrWhiteSpace(contentType)) return "—"; + if (contentType.StartsWith("image/", StringComparison.OrdinalIgnoreCase)) return "Image"; + if (contentType.StartsWith("audio/", StringComparison.OrdinalIgnoreCase)) return "Audio"; + if (contentType.StartsWith("video/", StringComparison.OrdinalIgnoreCase)) return "Video"; + if (contentType.StartsWith("model/", StringComparison.OrdinalIgnoreCase)) return "Model"; + // Common model/binary file types uploaded via the CDN + if (contentType.Equals("application/octet-stream", StringComparison.OrdinalIgnoreCase)) return "Model"; + return "—"; + } + + string AssetName(string objectKey) + { + if (string.IsNullOrWhiteSpace(objectKey)) return "—"; + var slash = objectKey.LastIndexOf('/'); + return slash >= 0 ? objectKey[(slash + 1)..] : objectKey; + } }