src/thinkextend/upload/driver/qiniu/QiniuStorage.php
public function delBatch($files)
    {
        $url = $this->QINIU_RS_HOST . '/batch';
        $ops = [];
        foreach ($files as $file) {
            $ops[] = "/delete/" . self::qiniuEncode("{$this->bucket}:{$file}");
        }
        $params = 'op=' . implode('&op=', $ops);
        $url .= '?' . $params;
        trace($url);
        $accessToken = $this->accessToken($url);
        $response    = $this->request($url, 'POST', ['Authorization' => "QBox $accessToken"]);
        return $response;
    }
public function delBatch($files)
    {
        $url = $this->QINIU_RS_HOST . '/batch';
        $ops = [];
        foreach ($files as $file) {
            $ops[] = "/delete/" . self::qiniuEncode("{$this->bucket}:{$file}");
        }
        $params = 'op=' . implode('&op=', $ops);
        $url .= '?' . $params;
        trace($url);
        $accessToken = $this->accessToken($url);
        $response    = $this->request($url, 'POST', ['Authorization' => "QBox $accessToken"]);
        return $response;
    }
public function delBatch ( $ files ) { $ url = $ this -> QINIU_RS_HOST . '/batch' ; $ ops = [ ] ; foreach ( $ files as $ file ) { $ ops [ ] = "/delete/" . self :: qiniuEncode ( "{$this->bucket}:{$file}" ) ; } $ params = 'op=' . implode ( '&op=' , $ ops ) ; $ url .= '?' . $ params ; trace ( $ url ) ; $ accessToken = $ this -> accessToken ( $ url ) ; $ response = $ this -> request ( $ url , 'POST' , [ 'Authorization' => "QBox $accessToken" ] ) ; return $ response ; }
批量删除文件
批量删除文件