private bool CheckIfImageFile(IFormFile file) { byte[] fileBytes; using (var ms = new MemoryStream()) { file.CopyTo(ms); fileBytes = ms.ToArray(); } return(WriterHelper.GetImageFormat(fileBytes) != WriterHelper.ImageFormat.unknown); }
private bool CheckIfImageByteFile(byte[] file) { return(WriterHelper.GetImageFormat(file) != WriterHelper.ImageFormat.unknown); }