File path: dist/twist/Core/Controllers/Upload.controller.php
Namespace: Twist\Core\Controllers
Extends: Base
Type: Controller
Upload
— The route controller for the File Upload manager that is used by the inline file and asset uploader.
This route can be easily added to your site by calling the Twist::Route()->upload() alias function.
<?php
/** --------- Option 1 --------- */
//Register a dynamic route that will direct all function requests to the controller
Twist::Route() -> controller('/upload%','\Twist\Core\Controllers\Upload');
/** --------- Option 2 --------- */
//Or you can register a route to only direct the current request to a particular controller method
Twist::Route() -> get('/upload/asset',array('\Twist\Core\Controllers\Upload','asset'));
Method | Access | Returns |
---|---|---|
_construct | public | void |
file | public | void |
asset | public | void |
storeFile | protected | void |