#91: Deprecating upload endpoint (#106)

* #91: Deprecating upload endpoint

* #91: Marking method as obsolete and left a todo

* #91: Removed methods
This commit was merged in pull request #106.
This commit is contained in:
KD
2025-02-27 19:35:39 -05:00
committed by GitHub
parent fd3ce9f96a
commit 86e54e086a
3 changed files with 5 additions and 120 deletions
+2 -24
View File
@@ -79,32 +79,10 @@ public class SongDataController : BaseController
// Cover art
//
[HttpPost("upload"), DisableRequestSizeLimit]
[Obsolete("Support for this endoint is no longer supported")]
public IActionResult Upload([FromForm(Name = "file")] List<IFormFile> songData)
{
try
{
_logger!.LogInformation("Uploading song...");
var uploads = _songTempDir;
_logger!.LogInformation($"Song root path {uploads}");
foreach (var sng in songData)
if (sng.Length > 0)
{
_logger!.LogInformation($"Song filename {sng.FileName}");
_songMgr!.SaveSongToFileSystem(sng).Wait();
}
return Ok();
}
catch (Exception ex)
{
var msg = ex.Message;
_logger!.LogError(msg, "An error occurred");
}
return NotFound();
return new StatusCodeResult(StatusCodes.Status410Gone);
}
// The client is expected to send the file, metadata, and cover art separately.