diff --git a/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb b/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb index 690d11ac..d52bb6bf 100644 --- a/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb +++ b/Jobs/ZUGFeRD/ImportZUGFeRDFiles.vb @@ -778,23 +778,26 @@ Public Class ImportZUGFeRDFiles Dim oMimeTypeProperty As ValidProperty = GetIndexProperty(embAttachmentList, groupIndex, "ATTACHMENT_FILE_MIMECODE") - If oMimeTypeProperty IsNot Nothing AndAlso oMimeTypeProperty.Value IsNot Nothing Then + If oMimeTypeProperty IsNot Nothing AndAlso oMimeTypeProperty.Value.IsNotNullOrEmpty() Then oMimeCodeString = oMimeTypeProperty.Value.ToLower() Else - _logger.Info("Empty MIME-Code! File can not be stored!") + _logger.Debug("Empty MIME-Code! File can not be stored!") Continue For End If Dim oFilenameProperty As ValidProperty = GetIndexProperty(embAttachmentList, groupIndex, "ATTACHMENT_FILE_FILENAME") - If oFilenameProperty IsNot Nothing Then + If oFilenameProperty IsNot Nothing AndAlso oFilenameProperty.Value.IsNotNullOrEmpty() Then oOrgFilename = oFilenameProperty.Value + Else + _logger.Debug("Empty Filename! File can not be stored!") + Continue For End If Dim oBase64ValueProperty As ValidProperty = GetIndexProperty(embAttachmentList, groupIndex, "ATTACHMENT_FILE_VALUE") - If oBase64ValueProperty IsNot Nothing Then + If oBase64ValueProperty IsNot Nothing AndAlso oBase64ValueProperty.Value.IsNotNullOrEmpty() Then oBase64String = oBase64ValueProperty.Value Else - _logger.Warn("Empty base64 String") + _logger.Error("Empty base64 String! File can not be stored!") Continue For End If @@ -803,6 +806,9 @@ Public Class ImportZUGFeRDFiles Dim oFileExtension = GetEmbeddedFileExtension(oMimeTypeProperty.Value) If oFileExtension.IsNotNullOrEmpty() Then newAttachmentFilename += "." + oFileExtension + Else + _logger.Warn("No extension found! File can not be stored!") + Continue For End If Dim embeddedFilePath = Path.Combine(oOutputPath, newAttachmentFilename)