Browse Source

update path import

pull/3/head
ibnu 2 years ago
parent
commit
26ac8cc9fc
  1. 4
      app/Http/Controllers/ActivityController.php

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

Loading…
Cancel
Save