Skip to content
Snippets Groups Projects
Commit 4cbd2e57 authored by Адлан Шамавов's avatar Адлан Шамавов
Browse files

fix

parent 3ebcddac
No related branches found
No related tags found
1 merge request!9Ptps controller 9
......@@ -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
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment