convert attachment filename to slug version

This commit is contained in:
Jonathan Jenne 2023-07-28 13:15:17 +02:00
parent 38189b6bbe
commit 33a363fdea

View File

@ -691,7 +691,10 @@ Public Class clsWorkEmail
'The original filename part will now be slugified to prevent errors 'The original filename part will now be slugified to prevent errors
'when opening the file in windream 'when opening the file in windream
Dim oFilename = StringEx.ConvertTextToSlug(oAttachment.SafeFileName)
Dim oFileInfo1 = New FileInfo(oAttachment.SafeFileName)
Dim oFilenameWithoutExtension = Path.GetFileNameWithoutExtension(oAttachment.SafeFileName)
Dim oFilename = StringEx.ConvertTextToSlug(oFilenameWithoutExtension) & oFileInfo1.Extension
Dim oAttachmentFileName = $"{CURRENT_MAIL_MESSAGE_ID}~{pCurrentMail.SenderDomain}~{oFilename}" Dim oAttachmentFileName = $"{CURRENT_MAIL_MESSAGE_ID}~{pCurrentMail.SenderDomain}~{oFilename}"
_Logger.Debug("Final Filename for Attachment: [{0}]", oAttachmentFileName) _Logger.Debug("Final Filename for Attachment: [{0}]", oAttachmentFileName)