Fix file sending, as a result of moving $size into Send::class when optimising mail sending
This commit is contained in:
@@ -41,7 +41,6 @@ final class File extends Send
|
||||
return $this->f->datetime->timestamp;
|
||||
|
||||
case 'name':
|
||||
case 'size':
|
||||
return $this->f->{$key};
|
||||
|
||||
case 'type':
|
||||
@@ -84,6 +83,8 @@ final class File extends Send
|
||||
*/
|
||||
public function open(string $compress=''): bool
|
||||
{
|
||||
$this->size = $this->f->size;
|
||||
|
||||
// If sending file is a File::class, then our file is s3
|
||||
if ($this->nameas && $this->f instanceof FileModel) {
|
||||
$this->fd = Storage::readStream($this->f->rel_name);
|
||||
|
@@ -46,9 +46,6 @@ final class Dynamic extends Send
|
||||
case 'mtime':
|
||||
return $this->sent->timestamp;
|
||||
|
||||
case 'size':
|
||||
return strlen($this->buffer);
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
@@ -104,6 +101,7 @@ final class Dynamic extends Send
|
||||
public function open(string $compress=''): bool
|
||||
{
|
||||
$this->buffer = (string)$this->item;
|
||||
$this->size = strlen($this->buffer);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -43,9 +43,6 @@ final class Tic extends Send
|
||||
case 'mtime':
|
||||
return $this->f->datetime->timestamp;
|
||||
|
||||
case 'size':
|
||||
return strlen($this->tic);
|
||||
|
||||
case 'type':
|
||||
return ($this->ftype&0xff00)>>8;
|
||||
|
||||
@@ -67,6 +64,8 @@ final class Tic extends Send
|
||||
|
||||
public function open(string $compress=''): bool
|
||||
{
|
||||
$this->size = strlen($this->tic);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user