fix check bcmath, fix error proof when no bcmath
parent
ed631d958d
commit
e16a7012ef
|
@ -573,7 +573,7 @@ class Aliyundrive {
|
|||
} else {
|
||||
if (isset($_POST['CalcProof'])&&is_numeric($_POST['filesize'])) {
|
||||
// Calc proof code
|
||||
if (!function_exists('hexdec')) {
|
||||
if (!function_exists('bcadd')) {
|
||||
// no php-bcmath
|
||||
return output(0, 200);
|
||||
} else {
|
||||
|
@ -614,8 +614,11 @@ class Aliyundrive {
|
|||
//error_log1($res['body']);
|
||||
$parent_file_id = json_decode($res['body'], true)['file_id'];
|
||||
}
|
||||
//$response = $this->fileCreate($parent_file_id, $filename, $_POST['filesha1'], $fileinfo['size'], ceil($fileinfo['size']/$_POST['chunksize']));
|
||||
$response = $this->fileCreate1($parent_file_id, $filename, $_POST['filesha1'], $_POST['proof_code'], $fileinfo['size'], ceil($fileinfo['size']/$_POST['chunksize']));
|
||||
if (!function_exists('bcadd')) {
|
||||
$response = $this->fileCreate($parent_file_id, $filename, $_POST['filesha1'], $fileinfo['size'], ceil($fileinfo['size']/$_POST['chunksize']));
|
||||
} else {
|
||||
$response = $this->fileCreate1($parent_file_id, $filename, $_POST['filesha1'], $_POST['proof_code'], $fileinfo['size'], ceil($fileinfo['size']/$_POST['chunksize']));
|
||||
}
|
||||
$res = json_decode($response['body'], true);
|
||||
if (isset($res['exist'])) {
|
||||
// 已经有
|
||||
|
|
Loading…
Reference in New Issue