feat: CMS cover-art upload on track edit page
This commit is contained in:
@@ -50,13 +50,25 @@ public interface ICmsTrackService
|
||||
/// </summary>
|
||||
Task<ResultContainer<TrackDto?>> GetByIdAsync(long id, CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// Upload a cover-art image to the images vault via <c>POST api/image/upload</c>.
|
||||
/// Returns the generated entry key on success. Maps a 400 to a validation failure message.
|
||||
/// </summary>
|
||||
Task<ResultContainer<string>> UploadImageAsync(
|
||||
Stream imageStream,
|
||||
string fileName,
|
||||
string contentType,
|
||||
CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// Update a track's metadata via <c>PUT api/track/meta/{id}</c>. EntryKey is immutable and
|
||||
/// not part of the update.
|
||||
/// not part of the update. <paramref name="imagePath"/> is tri-state: <c>null</c> leaves the
|
||||
/// cover art unchanged, <c>""</c> clears it, and any other value sets it.
|
||||
/// </summary>
|
||||
Task<Result> UpdateAsync(
|
||||
long id, string trackName, string artist,
|
||||
string? album, string? genre, DateOnly? releaseDate,
|
||||
string? imagePath = null,
|
||||
CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user