#91: Deprecating upload endpoint

This commit is contained in:
phoenix
2025-02-17 19:51:49 -05:00
parent fd3ce9f96a
commit 36544db3b3
+1 -24
View File
@@ -81,30 +81,7 @@ public class SongDataController : BaseController
[HttpPost("upload"), DisableRequestSizeLimit] [HttpPost("upload"), DisableRequestSizeLimit]
public IActionResult Upload([FromForm(Name = "file")] List<IFormFile> songData) public IActionResult Upload([FromForm(Name = "file")] List<IFormFile> songData)
{ {
try return new StatusCodeResult(410);
{
_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();
} }
// The client is expected to send the file, metadata, and cover art separately. // The client is expected to send the file, metadata, and cover art separately.