mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
"MDL-20824, use php exception to processs the file which excess the maximum file size"
This commit is contained in:
parent
66ec8e8b44
commit
7d9cb3b51a
5 changed files with 100 additions and 97 deletions
|
@ -279,11 +279,12 @@ EOD;
|
|||
break;
|
||||
case 'upload':
|
||||
try {
|
||||
$upload = $repo->get_listing();
|
||||
$upload['client_id'] = $client_id;
|
||||
echo json_encode($upload);
|
||||
} catch (repository_exception $e){
|
||||
$result = $repo->upload();
|
||||
$result['client_id'] = $client_id;
|
||||
echo json_encode($result);
|
||||
} catch (Exception $e){
|
||||
$err->e = $e->getMessage();
|
||||
$err->client_id = $client_id;
|
||||
die(json_encode($err));
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue