Added endpoint to download cover art

This commit is contained in:
kdeng00
2024-06-16 18:20:21 -04:00
parent 23c50de468
commit d4419b16d5
3 changed files with 20 additions and 21 deletions
+5 -7
View File
@@ -1,10 +1,3 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using Newtonsoft.Json;
namespace Icarus.Models;
@@ -33,5 +26,10 @@ public class CoverArt
return (flag == 0) ? filename : $"{filename}{extension}";
}
public async Task<byte[]> GetData()
{
return await File.ReadAllBytesAsync(this.ImagePath);
}
#endregion
}