src/components/cms/FilesRouting.php 1 location
|
@@ 90-98 (lines=9) @@
|
| 87 |
|
/** |
| 88 |
|
* @param CmsComponent $cmsComponent |
| 89 |
|
*/ |
| 90 |
|
private function newAjaxRoute($cmsComponent) |
| 91 |
|
{ |
| 92 |
|
if (isset($_FILES[CmsComponent::FILES_PARAMETER_FILE])) { |
| 93 |
|
$file = $cmsComponent->storage->getFiles()->addFile($_FILES[CmsComponent::FILES_PARAMETER_FILE]); |
| 94 |
|
header('Content-type: application/json'); |
| 95 |
|
die(json_encode($file)); |
| 96 |
|
} |
| 97 |
|
die('error occured'); |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
/** |
| 101 |
|
* @param $request |
src/components/cms/ImagesRouting.php 1 location
|
@@ 79-87 (lines=9) @@
|
| 76 |
|
* @param $request |
| 77 |
|
* @param CmsComponent $cmsComponent |
| 78 |
|
*/ |
| 79 |
|
private function newAjaxRoute($cmsComponent) |
| 80 |
|
{ |
| 81 |
|
if (isset($_FILES[CmsComponent::FILES_PARAMETER_FILE])) { |
| 82 |
|
$image = $cmsComponent->storage->getImages()->addImage($_FILES[CmsComponent::FILES_PARAMETER_FILE]); |
| 83 |
|
header('Content-type: application/json'); |
| 84 |
|
die(json_encode($image)); |
| 85 |
|
} |
| 86 |
|
die('error occured'); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
/** |
| 90 |
|
* @param $request |