Fix file sending, as a result of moving $size into Send::class when optimising mail sending

This commit is contained in:
2024-06-21 12:15:22 +10:00
parent 0a5374c743
commit 7bd192980f
4 changed files with 18 additions and 9 deletions

View File

@@ -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);