From 4cbd2e5735eb29f36f9340b2ed95bc5d1b8ea50a Mon Sep 17 00:00:00 2001
From: "a.shamavov" <a.shamavov@iqdev.digital>
Date: Wed, 17 Apr 2024 15:04:27 +0500
Subject: [PATCH] fix

---
 config/services.yaml              | 5 +----
 src/Controller/HomeController.php | 4 ++--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/config/services.yaml b/config/services.yaml
index b94693f..c18468a 100644
--- a/config/services.yaml
+++ b/config/services.yaml
@@ -21,7 +21,4 @@ services:
             - '../src/Kernel.php'
 
     # add more service definitions when explicit configuration is needed
-    # please note that last definitions always *replace* previous ones
-    App\Service\FileUploader:
-        arguments:
-            $targetDirectory: '%kernel.project_dir%/public/files/'
\ No newline at end of file
+    # please note that last definitions always *replace* previous ones
\ No newline at end of file
diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php
index 0e2c3d2..06abf3e 100644
--- a/src/Controller/HomeController.php
+++ b/src/Controller/HomeController.php
@@ -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;
@@ -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);
-- 
GitLab