From 26ac8cc9fc4bfd9695af79d62e9c280ea319c8d0 Mon Sep 17 00:00:00 2001 From: ibnu Date: Wed, 15 Mar 2023 05:57:21 +0700 Subject: [PATCH] update path import --- app/Http/Controllers/ActivityController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ActivityController.php b/app/Http/Controllers/ActivityController.php index 5c85f19..eb22282 100644 --- a/app/Http/Controllers/ActivityController.php +++ b/app/Http/Controllers/ActivityController.php @@ -395,7 +395,7 @@ class ActivityController extends Controller $gantt_id = $request->gantt_id; $name = $document->getClientOriginalName(); - $result = $document->move($this->pathDocument, $name); + $result = $document->move($this->pathTmpImport, $name); if($result){ $data = [ 'ref_id' => (int)$gantt_id, @@ -406,7 +406,7 @@ class ActivityController extends Controller $result = TmpImport::create($data); if(!$result){ - unlink($this->pathDocument.$name); + unlink($this->pathTmpImport.$name); return response()->json(['status'=>'failed','message'=>'Upload failed!','code'=> 500], 500); } return response()->json(['status'=>'success','message'=>'Upload successful!','code'=>200], 200);