/** * Process the queuedForWrite que. */ protected function flushWrites() { foreach ($this->queuedForWrite as $style) { if ($style->dimensions && $this->uploadedFile->isImage()) { $file = $this->resizer->resize($this->uploadedFile, $style); } else { $file = $this->uploadedFile->getRealPath(); } $filePath = $this->path($style->name); $this->move($file, $filePath); } $this->queuedForWrite = []; }