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