client brief image details - remove image working
This commit is contained in:
parent
c0db3f5238
commit
e1e844d057
12 changed files with 54 additions and 45 deletions
17
public/site/config/routes/remove-file.php
Normal file
17
public/site/config/routes/remove-file.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'pattern' => '(:all)remove-file.json',
|
||||
'method' => 'POST',
|
||||
'action' => function () {
|
||||
$json = file_get_contents('php://input');
|
||||
$data = json_decode($json);
|
||||
|
||||
$page = page($data->pageUri);
|
||||
$file = $page->file($data->fileName);
|
||||
|
||||
$file->delete();
|
||||
|
||||
return json_encode("File successfully removed.");
|
||||
}
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue