Loading config/services.yaml +1 −4 Original line number Diff line number Diff line Loading @@ -22,6 +22,3 @@ services: # add more service definitions when explicit configuration is needed # please note that last definitions always *replace* previous ones No newline at end of file App\Service\FileUploader: arguments: $targetDirectory: '%kernel.project_dir%/public/files/' No newline at end of file src/Controller/HomeController.php +2 −2 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ class HomeController extends AbstractController public function readLogFile(Request $request): Response { $file = $request->files->get('file'); $text = $this->functions->readLogFile($file); $text = $this->functions->readLogFile($file->getRealPath()); $response = new JsonResponse($text); $response->setEncodingOptions(JSON_UNESCAPED_UNICODE); return $response; Loading @@ -110,7 +110,7 @@ class HomeController extends AbstractController { $file = $request->files->get('file'); $text = ""; foreach ($this->functions->readFileLineByLine($file) as $line) { foreach ($this->functions->readFileLineByLine($file->getRealPath()) as $line) { $text .= $line; } $response = new JsonResponse($text); Loading Loading
config/services.yaml +1 −4 Original line number Diff line number Diff line Loading @@ -22,6 +22,3 @@ services: # add more service definitions when explicit configuration is needed # please note that last definitions always *replace* previous ones No newline at end of file App\Service\FileUploader: arguments: $targetDirectory: '%kernel.project_dir%/public/files/' No newline at end of file
src/Controller/HomeController.php +2 −2 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ class HomeController extends AbstractController public function readLogFile(Request $request): Response { $file = $request->files->get('file'); $text = $this->functions->readLogFile($file); $text = $this->functions->readLogFile($file->getRealPath()); $response = new JsonResponse($text); $response->setEncodingOptions(JSON_UNESCAPED_UNICODE); return $response; Loading @@ -110,7 +110,7 @@ class HomeController extends AbstractController { $file = $request->files->get('file'); $text = ""; foreach ($this->functions->readFileLineByLine($file) as $line) { foreach ($this->functions->readFileLineByLine($file->getRealPath()) as $line) { $text .= $line; } $response = new JsonResponse($text); Loading