未验证 提交 3f4eab57 编写于 作者: Q qkqpttgf 提交者: GitHub

in upload, not open new window, add copy button

上级 0fad2cb0
......@@ -608,7 +608,12 @@ function main($path)
$data = '{"name":"' . $_GET['filemd5'] . $ext . '"}';
//echo $oldname .'<br>'. $data;
$tmp = MSAPI('PATCH',$oldname,$data,$_SERVER['access_token']);
if ($tmp['stat']==409) MSAPI('DELETE',$oldname,'',$_SERVER['access_token'])['body'];
if ($tmp['stat']==409) {
MSAPI('DELETE',$oldname,'',$_SERVER['access_token']);
$tmpbody = json_decode($tmp['body'], true);
$tmpbody['name'] = $_GET['filemd5'] . $ext;
$tmp['body'] = json_encode($tmpbody);
}
$path1 = path_format($_SERVER['list_path'] . path_format($path));
savecache('path_' . $path1, json_decode('{}',true), 1);
return output($tmp['body'],$tmp['stat']);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册