pridane tlacitko na zmazanie prilohy,
implementovany upload a zobrazenie suboru obrazku
This commit is contained in:
12
api.php
12
api.php
@ -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',
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user