You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey. Been using this package for a while now, working well until recently. For a particular model I'm using a PDF as an attachment.
Works fine with image file types (jpg, png, etc). But PDF's throw the error below. Getting this same error both locally and on my server hosted with Digital Ocean managed by Laravel Forge.
at codesleeve/stapler/src/Attachment.php , protected function flushWrites() {}
$this->move($file, $filePath); causes this problem because if non image file of $file var is just, temporaly uploaded file of php system . so, only just 1time works fine. but next loop, this tmp file was gone by $this->move() .
I think need skipping for this loop if non image given and style dose not original like this
protected function flushWrites()
{
foreach ($this->queuedForWrite as $style) {
if ($style->name != 'original' && !$this->uploadedFile->isImage()) {
continue;
}
Activity
tabennett commentedon Jan 30, 2016
I've never had any issues uploading pdf's with this package. Are you defining styles for the attachment that you're uploading the PDF with?
NightZpy commentedon Jan 31, 2016
Maybe 'files' => true in the form definition?
gravitano commentedon Jun 2, 2016
Hello, I have some problem regarding this issue. Any update for this?
fukuyama-ej commentedon Jul 10, 2017
I have some problem too. this problem was occured when hasAttachedFile have styles options
this is not good
it works fine
at codesleeve/stapler/src/Attachment.php ,
protected function flushWrites() {}$this->move($file, $filePath);causes this problem because if non image file of $file var is just, temporaly uploaded file of php system . so, only just 1time works fine. but next loop, this tmp file was gone by$this->move().I think need skipping for this loop if non image given and style dose not original like this
Thanks a lot.