| 1 | <?php |
||
| 12 | class Content extends ApiController |
||
| 13 | { |
||
| 14 | public $maxSize = 512000; // in bytes, 500 * 1024 |
||
| 15 | public $maxResize = 150; |
||
| 16 | |||
| 17 | public $allowedExt = ['jpg', 'png', 'gif', 'jpeg', 'bmp', 'webp']; |
||
| 18 | |||
| 19 | // import actions from traits |
||
| 20 | use Content\ActionChangeRate { |
||
| 21 | changeRate as actionChangerate; |
||
| 22 | } |
||
| 23 | |||
| 24 | use Content\ActionGalleryUpload { |
||
| 25 | galleryUpload as actionGalleryupload; |
||
| 26 | } |
||
| 27 | |||
| 28 | use Content\ActionGalleryList { |
||
| 29 | galleryList as actionGallerylist; |
||
| 30 | } |
||
| 31 | |||
| 32 | use Content\ActionGalleryDelete { |
||
| 33 | galleryDelete as actionGallerydelete; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Prepare configurations before initialization |
||
| 38 | */ |
||
| 39 | public function before() |
||
| 52 | } |
||
| 53 |