Multiples attachments on Windows duplicate #602
Comments
I have the same problem : |
Looks Like a cache collision have you tried disabling the cache? The interrestings parts might be the position where the keynames are On Sat, Apr 18, 2015 at 8:39 PM, Eduardo Schitz notifications@github.com
Xavier De Cock |
How disable the cache ? With 10 files attachments, we are 10 files with the content of 3 files |
No idea about how symfony works exactly but this should do the trick : Swift_Preferences::getInstance()->setCacheType('null') On Mon, May 11, 2015 at 4:20 PM, Desjardins Jérôme <notifications@github.com
Xavier De Cock |
Yep, It's work with \Swift_Preferences::getInstance()->setCacheType('null') before |
Ok, so definitively looks like a cache Collision, our keys probably This might be tricky to get out of (uniqid collision probably) On Mon, May 11, 2015 at 5:01 PM, Desjardins Jérôme <notifications@github.com
Xavier De Cock |
uniqid() is anything but unique, second to that md5 is not very collision free either. I think something like And looking at the code I actually found a serious bug!!
|
I just realized something, the cacheKey is only used in this class, and only for the _bodyToString() method. So instead of creating it ever time in the constructor it should only be set when needed and not set previously. To increase the performance a bit :) |
:) so, was creating ok result on "nux but problems on windows, were uniqid On Thu, May 14, 2015 at 10:23 AM, Sebastiaan Stok notifications@github.com
Xavier De Cock |
All this problems with non embedded images, images as attachments, re-downloading embedded images, ... are a result of this commit 45c2e4d ... maybe we can only use the "clone" of the objects if we need it - the fix is only for "MemorySpool"-Transport!? |
…collection Adds ability to cap log size in redis
Hello,
I'm trying attach multiple files with Swift_Attachment. On MAC, it's ok, but on Windows, the files are duplicated. If I send 3 files, sometimes the 3 files are equal, other times 2 files are equal and 1 different.
This only happens on Windows. The same code on MAC, it's ok.
Any idea? The last code that I tried:
(The paths are different)
$attachments[] = Swift_Attachment::fromPath($pathfile_1, 'application/pdf')->setFilename($_FILES['file_1']['name']);
$attachments[] = Swift_Attachment::fromPath($pathfile_2, 'application/pdf')->setFilename($_FILES['file_2']['name']);
$attachments[] = Swift_Attachment::fromPath($file_pdf, 'application/pdf')->setFilename($filename.'.pdf');
$attachments[] = Swift_Attachment::fromPath($file_xml, 'text/xml')->setFilename($filename.'.xml');
foreach ($attachments AS $attachment) {
$message->attach($attachment);
}
The text was updated successfully, but these errors were encountered: