From 78329d5d1e63ad0d05dc1bc93cbabbee707c16dc Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Tue, 25 Feb 2020 13:07:54 +0800 Subject: [PATCH] fix bug: reupload --- function/common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/function/common.php b/function/common.php index 3c68e9e..b14dbc4 100644 --- a/function/common.php +++ b/function/common.php @@ -433,8 +433,8 @@ function bigfileupload($path) //echo json_encode($getoldupinfo, JSON_PRETTY_PRINT); if (isset($getoldupinfo['file'])&&$getoldupinfo['size']<5120) { $getoldupinfo_j = curl_request($getoldupinfo['@microsoft.graph.downloadUrl']); - $getoldupinfo = json_decode($getoldupinfo_j , true); - if ( json_decode( curl_request($getoldupinfo['uploadUrl']), true)['@odata.context']!='' ) return output($getoldupinfo_j); + $getoldupinfo = json_decode($getoldupinfo_j['body'], true); + if ( json_decode( curl_request($getoldupinfo['uploadUrl'])['body'], true)['@odata.context']!='' ) return output($getoldupinfo_j['body'], $getoldupinfo_j['stat']); } if (!$_SERVER['admin']) $filename = spurlencode( $fileinfo['name'] ) . '.scfupload'; $response=MSAPI('createUploadSession',path_format($path1 . '/' . $filename),'{"item": { "@microsoft.graph.conflictBehavior": "fail" }}',$_SERVER['access_token']);