openstamanager/modules/aggiornamenti/api/create.php

21 lines
383 B
PHP
Raw Normal View History

2018-07-31 14:50:28 +02:00
<?php
switch ($resource) {
case 'allegato':
$module = Modules::get($request['module']);
$upload = Uploads::upload($_FILES['upload'], [
'name' => $request['name'],
'id_module' => $module['id'],
2018-08-20 13:09:27 +02:00
'id_record' => $request['id'],
2018-07-31 14:50:28 +02:00
]);
2018-08-20 13:09:27 +02:00
$response['filename'] = $upload;
2018-07-31 14:50:28 +02:00
break;
}
return [
'allegato',
];