This commit is contained in:
uwaa 2024-11-14 02:31:06 +00:00
parent ba79856131
commit e0ae00c523

View file

@ -89,7 +89,11 @@ public partial class FileEndpoint : RouterBase
{
mime = GuessMIMEType(fileInfo.Extension);
}
return !File.Exists(assetPath) ? null : (HttpResponse)new HttpContent(mime, await File.ReadAllBytesAsync(assetPath));
if (!File.Exists(assetPath))
return null;
return new HttpContent(mime, await File.ReadAllBytesAsync(assetPath));
}
/// <summary>