#103: Remove WAV support #105
@@ -366,11 +366,12 @@ public class SongManager : BaseManager
|
|||||||
return song;
|
return song;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Create(IFormFile file, string filePath, string prompt)
|
|
||||||
|
public CreateFileResult Create(IFormFile file, string filePath, string prompt)
|
||||||
{
|
{
|
||||||
if (System.IO.File.Exists(filePath))
|
if (System.IO.File.Exists(filePath))
|
||||||
{
|
{
|
||||||
return 1;
|
return CreateFileResult.AlreadyExists;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var filestream = new FileStream(filePath, FileMode.Create))
|
using (var filestream = new FileStream(filePath, FileMode.Create))
|
||||||
@@ -380,7 +381,7 @@ public class SongManager : BaseManager
|
|||||||
|
|
||||||
if (System.IO.File.Exists(filePath))
|
if (System.IO.File.Exists(filePath))
|
||||||
{
|
{
|
||||||
return 2;
|
return CreateFileResult.FileCreatedAndExists;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user