duanbushi1867 2017-06-19 09:10
浏览 105
已采纳

在Dropbox API中搜索文件和文件夹

I am developing a application that will show all the files and folders in the web page. I have done this.

Now i am trying to add search filter for that.
I have searched in google. But not getting expected result.

I have completed getting the accessToken from credential.

$client = new Dropbox\Client($_SESSION['accessToken'],parent::$appName,'UTF-8');

From this I am getting all the files.
How to pass the search file names or folder names here?

  • 写回答

1条回答 默认 最新

  • dongxingchang9345 2017-06-19 09:20
    关注

    You can not pass the file names or folder names in the Dropbox\Client.
    There is separate function(searchFileNames) to pass the path,query string.

    If you pass the parameter that will return the files and folder.

    $client = new Dropbox\Client($_SESSION['accessToken'],parent::$appName,'UTF-8');
    
    $foldername=isset($foldername)?$foldername:'';
    $dropbox_file=$client->searchFileNames('/'.$foldername,$search);
    

    if you print the $dropbox_file you can see the files and folders.

    echo '<pre>';
    print_r($dropbox_file);
    echo '</pre>';
    

    For more functions you can check here

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败
  • ¥15 树莓派5怎么用camera module 3啊
  • ¥20 java在应用程序里获取不到扬声器设备
  • ¥15 echarts动画效果的问题,请帮我添加一个动画。不要机器人回答。
  • ¥15 Attention is all you need 的代码运行