public async Task <NodeEntry> CheckOutputFormat(string nodeId, byte[] file, string mimeType) { List <string> allowedExtensions = new List <string> { "application/pdf", // PDF "image/jpeg", // JPEG/JPG "image/pjpeg", // JFIF "image/png", // PNG "image/tiff", // TIF/TIF "video/mpeg", // MPEG ??? "audio/mpeg", // MPEG "application/xml" // XML }; if (allowedExtensions.Any(x => mimeType.Contains(x))) { if (mimeType == "application/pdf") { await _signerService.CheckAndUpdateComponent(nodeId, file); return(await UpdateOutputFormatProperties(nodeId, await _pdfService.IsPdfA2B(new MemoryStream(file)))); } return(await UpdateOutputFormatProperties(nodeId, true)); } return(await UpdateOutputFormatProperties(nodeId, false)); }