diff --git a/demo/download_token.php b/demo/download_token.php deleted file mode 100644 index f282a247..00000000 --- a/demo/download_token.php +++ /dev/null @@ -1,27 +0,0 @@ -MakeRequest($url, null); + +echo "\n"; +$url = 'http://sslayer.qiniudn.com/dive-into-golang.pptx?odconv/pdf'; +echo $gpy->MakeRequest($url, null); + +echo "\n"; +$url = 'http://sslayer.qiniug.com/2.m3u8'; +echo $gpy->MakeRequest($url, null); diff --git a/demo/up.php b/demo/up.php index 3f52e257..1b7b2fab 100644 --- a/demo/up.php +++ b/demo/up.php @@ -5,7 +5,7 @@ $bucket = 'rwxf'; $key = 'up.php'; -$file = __FILE__; //path to local file +$file = ; $client = new Qiniu_MacHttpClient(null); diff --git a/qiniu/io.php b/qiniu/io.php index d77a03bf..d150938a 100644 --- a/qiniu/io.php +++ b/qiniu/io.php @@ -70,10 +70,7 @@ function Qiniu_PutFile($upToken, $key, $localFile, $putExtra) // => ($putRet, $e } $fields = array('token' => $upToken, 'file' => createFile($localFile, $putExtra->MimeType)); - if ($key === null) { - $fname = '?'; - } else { - $fname = $key; + if ($key !== null) { $fields['key'] = $key; } if ($putExtra->CheckCrc) {