From d33578ad57824bdff5ffda2382de45d8f17593f3 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 25 Apr 2021 11:07:55 +0800 Subject: [PATCH] fix: continue upload after stop --- disk/Onedrive.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/disk/Onedrive.php b/disk/Onedrive.php index de477a3..c7e01c9 100644 --- a/disk/Onedrive.php +++ b/disk/Onedrive.php @@ -885,9 +885,9 @@ class Onedrive { } if ($fileinfo['size']>10*1024*1024) { $cachefilename = spurlencode( $fileinfo['path'] . '/.' . $fileinfo['filelastModified'] . '_' . $fileinfo['size'] . '_' . $fileinfo['name'] . '.tmp', '/'); - $getoldupinfo=$this->list_files(path_format($path . '/' . $cachefilename)); - //echo json_encode($getoldupinfo, JSON_PRETTY_PRINT); - if (isset($getoldupinfo['file'])&&$getoldupinfo['size']<5120) { + $getoldupinfo = $this->list_files(path_format($path . '/' . $cachefilename)); + //error_log1(json_encode($getoldupinfo, JSON_PRETTY_PRINT)); + if (isset($getoldupinfo['url'])&&$getoldupinfo['size']<5120) { $getoldupinfo_j = curl('GET', $getoldupinfo['url']); $getoldupinfo = json_decode($getoldupinfo_j['body'], true); if ( json_decode( curl('GET', $getoldupinfo['uploadUrl'])['body'], true)['@odata.context']!='' ) return output($getoldupinfo_j['body'], $getoldupinfo_j['stat']); @@ -998,10 +998,10 @@ class Onedrive { } } curl_close($ch); - error_log1($response['stat'].' + /*error_log1($response['stat'].' '.$response['body'].' '.$url.' - '); + ');*/ return $response; }