#103: Adding checks to prevent .wav files from being uploaded:
This commit is contained in:
@@ -196,6 +196,7 @@ public class SongManager : BaseManager
|
||||
}
|
||||
|
||||
// Change the name of this method to only focus on wav files
|
||||
[Obsolete("Support for uplodaing wav files will end. Use the flac alternative instead - SaveFlacSongToFileSystem(..)")]
|
||||
public Song SaveSongToFileSystem(IFormFile songFile, IFormFile coverArtData, Song song)
|
||||
{
|
||||
if (string.IsNullOrEmpty(song.SongDirectory))
|
||||
|
||||
@@ -151,8 +151,9 @@ public class SongDataController : BaseController
|
||||
switch (song.AudioType)
|
||||
{
|
||||
case "wav":
|
||||
song = _songMgr.SaveSongToFileSystem(up.SongData, up.CoverArtData, song);
|
||||
break;
|
||||
// song = _songMgr.SaveSongToFileSystem(up.SongData, up.CoverArtData, song);
|
||||
// TODO: Make sure the tmp file gets deleted
|
||||
return BadRequest(".wav files are not supported");
|
||||
case "flac":
|
||||
song = _songMgr.SaveFlacSongToFileSystem(up.SongData, up.CoverArtData, song);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user