public function uploadNamespace(Request $request, $namespace)
    {
        if ($handler = $request->get('handler')) {
            // Use custom handlers
            if (is_array($handler)) {
                return $this->processCustomUploadHandler($request, $handler);
            }
            list($namespace, $prefix) = $this->parser($handler);
            $this->app['upload.namespace'] = $namespace;
            $this->app['upload.prefix'] = $prefix;
        } else {
            $namespace = $this->app['upload.namespace'];
        }

        // Perform the file upload actions and collect the results
        $fileUpload = $this->handleUploadFiles($request, $namespace);

        return $this->json($fileUpload, Response::HTTP_OK, ['Content-Type' => 'text/plain']);
    }
public function uploadNamespace(Request $request, $namespace)
    {
        if ($handler = $request->get('handler')) {
            // Use custom handlers
            if (is_array($handler)) {
                return $this->processCustomUploadHandler($request, $handler);
            }
            list($namespace, $prefix) = $this->parser($handler);
            $this->app['upload.namespace'] = $namespace;
            $this->app['upload.prefix'] = $prefix;
        } else {
            $namespace = $this->app['upload.namespace'];
        }

        // Perform the file upload actions and collect the results
        $fileUpload = $this->handleUploadFiles($request, $namespace);

        return $this->json($fileUpload, Response::HTTP_OK, ['Content-Type' => 'text/plain']);
    }
public function uploadNamespace ( Request $ request , $ namespace ) { if ( $ handler = $ request -> get ( 'handler' ) ) { // Use custom handlers if ( is_array ( $ handler ) ) { return $ this -> processCustomUploadHandler ( $ request , $ handler ) ; } list ( $ namespace , $ prefix ) = $ this -> parser ( $ handler ) ; $ this -> app [ 'upload.namespace' ] = $ namespace ; $ this -> app [ 'upload.prefix' ] = $ prefix ; } else { $ namespace = $ this -> app [ 'upload.namespace' ] ; } // Perform the file upload actions and collect the results $ fileUpload = $ this -> handleUploadFiles ( $ request , $ namespace ) ; return $ this -> json ( $ fileUpload , Response :: HTTP_OK , [ 'Content-Type' => 'text/plain' ] ) ; }
Route to handle file uploads.

@param Request $request
@param string  $namespace

@return \Symfony\Component\HttpFoundation\JsonResponse
Route to handle file uploads .