From dfb52bd771a004acd3af781d2654170525fa5a8c Mon Sep 17 00:00:00 2001 From: oott123 Date: Tue, 23 Jul 2013 11:19:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BE=E5=BA=A6=E6=96=B0=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _bpcs_files_/core.php | 2 +- bpcs_uploader.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_bpcs_files_/core.php b/_bpcs_files_/core.php index 132ef3e..b2dc72e 100644 --- a/_bpcs_files_/core.php +++ b/_bpcs_files_/core.php @@ -150,7 +150,7 @@ function get_quota($access_token){ } function upload_file($access_token,$path,$localfile,$ondup='newcopy'){ $path='/apps/'.urlencode(file_get_contents(CONFIG_DIR.'/appname').'/'.$path); - $url = "https://pcs.baidu.com/rest/2.0/pcs/file?method=upload&access_token=$access_token&path=$path&ondup=$ondup"; + $url = "https://c.pcs.baidu.com/rest/2.0/pcs/file?method=upload&access_token=$access_token&path=$path&ondup=$ondup"; $add = "--form file=@$localfile"; $cmd = "curl -X POST -k -L $add \"$url\""; $cmd = cmd($cmd); diff --git a/bpcs_uploader.php b/bpcs_uploader.php index 1bce4e5..b22cb49 100644 --- a/bpcs_uploader.php +++ b/bpcs_uploader.php @@ -73,7 +73,7 @@ die(); } $path='/apps/'.urlencode(file_get_contents(CONFIG_DIR.'/appname').'/'.$argv[3]); - $cmd = 'wget --no-check-certificate -O "'.$argv[2].' " "https://pcs.baidu.com/rest/2.0/pcs/file?method=download&access_token='.$access_token.'&path='.$path.'"'; + $cmd = 'wget --no-check-certificate -O "'.$argv[2].' " "https://d.pcs.baidu.com/rest/2.0/pcs/file?method=download&access_token='.$access_token.'&path='.$path.'"'; cmd($cmd); break; case 'delete':