pridane tlacitko na zmazanie prilohy,

implementovany upload a zobrazenie suboru obrazku
This commit is contained in:
2025-05-17 13:46:26 +02:00
parent 16fa3d1ed1
commit 4a050b0ff7
4 changed files with 130 additions and 14 deletions

12
api.php
View File

@ -57,6 +57,11 @@ switch ($action) {
case 'attachmentGetAll':
$result = attachmentGetAll($_REQUEST['report_id']);
break;
case 'attachmentDelete':
$suc = attachmentDelete($_REQUEST['attachment_id']);
if ($suc === false) $error = 'Attachment delete failed';
$result = array('processed' => $suc);
break;
}
header('Content-Type: application/json');
@ -172,6 +177,13 @@ function help()
'params' => [
'report_id' => 'Report id',
]
],
'attachmentGet' => [
'name' => 'attachmentGet',
'description' => 'Get attachment',
'params' => [
'attachment_id' => 'Attachment id',
]
]
]
];