find($this->elementId); if (! $element instanceof ContentElement) { return; } $deriver->forWebsiteImage($element, $this->incoming); $element->refresh(); if ($release->derivedPath($element) === null) { return; } if ($this->incomingIsDisposable()) { Storage::disk('cms_incoming')->delete($this->incoming); } PublishWebsiteMedia::dispatch($element->id, 'release', $this->actorId); } private function incomingIsDisposable(): bool { return (str_starts_with($this->incoming, 'cms/') || str_starts_with($this->incoming, 'vorschau/')) && ! str_contains($this->incoming, '..'); } }