PHP Class Bolt\Controller\Backend\Upload

Author: Ross Riley ([email protected])
Inheritance: extends BackendBase
Show file Open project: bolt/bolt

Public Methods

Method Description
before ( Request $request, Silex\Application $app, null $roleRoute = null ) : null | RedirectResponse
uploadNamespace ( Request $request, string $namespace ) : Symfony\Component\HttpFoundation\JsonResponse Route to handle file uploads.

Protected Methods

Method Description
addRoutes ( Silex\ControllerCollection $c )

Private Methods

Method Description
getFilesToProcess ( Request $request, string $namespace, string $files = null ) : array Determine the list of files to upload.
handleUploadFiles ( Request $request, string $namespace, string $files = null ) : array Perform a file upload.
parser ( string $handler ) : array Parse a string and determine the upload prefix and namespace.
processCustomUploadHandler ( Request $request, array $handler ) : Symfony\Component\HttpFoundation\JsonResponse This handles the more advanced functionality where multiple upload handlers are provided. Only the first one is returned as a result, the result of this first upload is then attempted to copy to the remaining handlers.

Method Details

addRoutes() protected method

protected addRoutes ( Silex\ControllerCollection $c )
$c Silex\ControllerCollection

before() public method

public before ( Request $request, Silex\Application $app, null $roleRoute = null ) : null | RedirectResponse
$request Symfony\Component\HttpFoundation\Request
$app Silex\Application
$roleRoute null
return null | Symfony\Component\HttpFoundation\RedirectResponse

uploadNamespace() public method

Route to handle file uploads.
public uploadNamespace ( Request $request, string $namespace ) : Symfony\Component\HttpFoundation\JsonResponse
$request Symfony\Component\HttpFoundation\Request
$namespace string
return Symfony\Component\HttpFoundation\JsonResponse