file_path}"); return match($version->mime_type) { 'application/pdf' => response()->file($filePath), 'image/*' => response()->file($filePath), default => response()->file( $this->convertToPdf($filePath) ) }; } private function convertToPdf($filePath) { // Usar OnlyOffice o LibreOffice para conversión } }