|
|
|
@ -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); |
|
|
|
|