Quantcast
Channel: ImapX 2
Viewing all articles
Browse latest Browse all 1952

Commented Issue: Attachment Filename not properly set [1423]

$
0
0
When trying to invoke the savefile method it was complaining about illegal characters in path, so I did a little investigation and discovered that the filename for the attachments was set to: <br>(example)<br>Application Package and<br> Deployment Group Naming Convention v2.docx&quot;; size=2458458;<br> creation-date=&quot;Wed, 22 Aug 2012 08:12:35 GMT&quot;;<br> modification-date=&quot;Wed, 22 Aug 2012 08:12:35 GMT&quot;<br>(end example)<br><br>after some digging I found out that lines 406 to 412 in Message.cs was missing and additional split on ; character and a replace for \n character (as it can be multiline string for long filename)<br><br>below is the correct code for lines 406 to 412 in Message.cs<br> string contentFilename = current3.Value.Split(new[]<br> {<br> &quot;filename=&quot;<br> }, StringSplitOptions.None)[1].Split(';')[0].Trim(new[]<br> {<br> '&quot;'<br> }).Replace(&quot;\n&quot;,&quot;&quot;);
Comments: ** Comment from web user: pavel_azanov **

Good day!

Thank you for your feedback and the code suggestion. I will update the library on weekend.

Greets,

Pavel Azanov


Viewing all articles
Browse latest Browse all 1952

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>