#91: Deprecating upload endpoint
This commit is contained in:
@@ -81,30 +81,7 @@ public class SongDataController : BaseController
|
||||
[HttpPost("upload"), DisableRequestSizeLimit]
|
||||
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(410);
|
||||
}
|
||||
|
||||
// The client is expected to send the file, metadata, and cover art separately.
|
||||
|
||||
Reference in New Issue
Block a user