plugins/Field/src/Controller/FileHandlerController.php 1 location
|
@@ 89-93 (lines=5) @@
|
86 |
|
$this->loadModel('Field.FieldInstances'); |
87 |
|
$instance = $this->_getInstance($name); |
88 |
|
|
89 |
|
if ($instance && !empty($this->request->query['file'])) { |
90 |
|
$file = normalizePath(WWW_ROOT . "/files/{$instance->settings['upload_folder']}/{$this->request->query['file']}", DS); |
91 |
|
$file = new File($file); |
92 |
|
$file->delete(); |
93 |
|
} |
94 |
|
|
95 |
|
$response = ''; |
96 |
|
$this->viewBuilder()->layout('ajax'); |
plugins/Field/src/Controller/ImageHandlerController.php 1 location
|
@@ 98-102 (lines=5) @@
|
95 |
|
$this->loadModel('Field.FieldInstances'); |
96 |
|
$instance = $this->_getInstance($name); |
97 |
|
|
98 |
|
if ($instance && !empty($this->request->query['file'])) { |
99 |
|
$file = normalizePath(WWW_ROOT . "/files/{$instance->settings['upload_folder']}/{$this->request->query['file']}", DS); |
100 |
|
$file = new File($file); |
101 |
|
$file->delete(); |
102 |
|
} |
103 |
|
|
104 |
|
$response = ''; |
105 |
|
$this->viewBuilder()->layout('ajax'); |