encrypt via fileID

pull/453/head
qkqpttgf 2021-10-21 11:40:55 +08:00 committed by GitHub
parent 07664407c6
commit d02c9beb53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -131,7 +131,7 @@ class Onedrive {
} else { } else {
$files['error']['stat'] = 503; $files['error']['stat'] = 503;
$files['error']['code'] = 'unknownError'; $files['error']['code'] = 'unknownError';
$files['error']['message'] = 'unknownError'; $files['error']['message'] = 'unknownError ' . $arr['body'] . " ~";
} }
//$files = json_decode( '{"unknownError":{ "stat":'.$arr['stat'].',"message":"'.$arr['body'].'"}}', true); //$files = json_decode( '{"unknownError":{ "stat":'.$arr['stat'].',"message":"'.$arr['body'].'"}}', true);
//error_log1(json_encode($files, JSON_PRETTY_PRINT)); //error_log1(json_encode($files, JSON_PRETTY_PRINT));
@ -180,6 +180,7 @@ class Onedrive {
return $files; return $files;
} }
//error_log1(json_encode($tmp)); //error_log1(json_encode($tmp));
//echo '<pre>' . json_encode($tmp, JSON_PRETTY_PRINT) . '</pre>';
return $tmp; return $tmp;
} }
@ -357,7 +358,7 @@ class Onedrive {
//return output($result['body'], $result['stat']); //return output($result['body'], $result['stat']);
} }
public function Encrypt($folder, $passfilename, $pass) { public function Encrypt($folder, $passfilename, $pass) {
$filename = path_format($folder['path'] . '/' . urlencode($passfilename)); $filename = '/items/' . $folder['id'] . ':/' . urlencode($passfilename);
if ($pass==='') { if ($pass==='') {
$result = $this->MSAPI('DELETE', $filename); $result = $this->MSAPI('DELETE', $filename);
} else { } else {