public function upload(Request $request)
    {
        $interventionConfig = json_decode($request->input('intervention'), true);
        $appendedPath = $request->input('uploadSubDir');

        $uploadResponse = (new Uploader)->fancyUpload($request, $interventionConfig ?: [], $appendedPath);

        return response()->json($uploadResponse);
    }
public function upload(Request $request)
    {
        $interventionConfig = json_decode($request->input('intervention'), true);
        $appendedPath = $request->input('uploadSubDir');

        $uploadResponse = (new Uploader)->fancyUpload($request, $interventionConfig ?: [], $appendedPath);

        return response()->json($uploadResponse);
    }
public function upload ( Request $ request ) { $ interventionConfig = json_decode ( $ request -> input ( 'intervention' ) , true ) ; $ appendedPath = $ request -> input ( 'uploadSubDir' ) ; $ uploadResponse = ( new Uploader ) -> fancyUpload ( $ request , $ interventionConfig ? : [ ] , $ appendedPath ) ; return response ( ) -> json ( $ uploadResponse ) ; }
pass a file object from request
pass a file object from request