X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/689557880514b74d0e21a56b40fe16a78f3b1a65..6f6cfb13fc72f4baac6f6bd53e5c1c20f9715c9e:/lib/functions.php?ds=sidebyside diff --git a/lib/functions.php b/lib/functions.php index 1444c1f..46c004a 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1008,6 +1008,11 @@ function jirafeau_async_push($ref, $data, $code, $max_file_size) if ($a['next_code'] != "$code") { return "Error: bad transfer code"; } + if ($data['error'] != UPLOAD_ERR_OK) { + // Check error code in https://www.php.net/manual/en/features.file-upload.errors.php + $data_details = print_r($data, true); + return "Error: upload error: {$data_details}"; + } if (empty($data['tmp_name'])) { return "Error: missing tmp_name"; }