git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MailConsumer replacing identical filename attachments


Hi,

I just checked the code of MailBinding, it checked the filename[1] and log
warning message for it.
I'm not sure if this is  the best way to resolve this issue as we have to
rename the filename (such as add a number after the name) to make sure
there is no conflict between the keys.)



[1]
https://github.com/apache/camel/blob/5ebd2f11c25a36bb3ed6d6b556ae3bb96a23aa0a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java#L331


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jun 20, 2018 at 8:02 PM, Joery Vreijsen <jhjvreijsen@xxxxxxxxx>
wrote:

> Hi there!
>
> I’m struggling with the camel-mail consumer, when it reads the MailMessage
> and extracts the multipart attachments.
> Looking at the implementation of MailBinding.java I notice that the
> multipart attachments are put in an Map<String, Attachment>() causing
> attachments
> with the same filename to be overwritten by the Map#put method.
>
> I was wondering if this is a known issue, or something we could possibly
> fix?
>
> Any advice is welcome!
>
> Greetings,
>
> - Joery Vreijsen
>


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-camel-users/msg03445.html on line 108
Call Stack
#TimeMemoryFunctionLocation
10.0005364600{main}( ).../msg03445.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-camel-users/msg03445.html on line 108
Call Stack
#TimeMemoryFunctionLocation
10.0005364600{main}( ).../msg03445.html:0