tcc/ASP.NET/Services/ImageService.cs

25 lines
536 B
C#

namespace TCC.Services
{
public class ImageService
{
public ImageService() { }
public void SaveImage(Stream fileStream)
{
var file = File.Create("image.png");
fileStream.CopyToAsync(file);
file.Close();
}
public byte[] GetSimpleImage()
{
return File.ReadAllBytes("static/small-image.png");
}
public byte[] GetBigImage()
{
return File.ReadAllBytes("static/big-image.png");
}
}
}