private bool CheckIfDocumentFile(IFormFile file) { byte[] fileBytes; using (var ms = new MemoryStream()) { file.CopyTo(ms); fileBytes = ms.ToArray(); } return(WriterHelper.GetDocumentFormat(fileBytes) != WriterHelper.DocumentFormat.unknown); }
private bool CheckIfDocumentByteFile(byte[] document) { return(WriterHelper.GetDocumentFormat(document) != WriterHelper.DocumentFormat.unknown); }