【问题标题】:How to permanently delete the file from Google Drive, using the Google API Client如何使用 Google API 客户端从 Google Drive 中永久删除文件
【发布时间】:2013-03-15 07:50:20
【问题描述】:

我使用库 google-api-php-client 下载和删除 Google Drive 中的文件。
要删除,以下功能(文件已共享):

public function removeFile($fileId) {
    try {
        $this->service->files->delete($fileId);
    } catch (Exception $e) {
        return "Error: " . $e->getMessage();
    }
    return true;
}

在这种情况下,文件的Web界面Google Drive仍然存在,但无法打开或移动垃圾箱。

如何删除文件,使其从网页界面消失?

【问题讨论】:

    标签: php google-drive-api google-api-php-client


    【解决方案1】:

    好吧,我认为这是 Drive SDK 中的错误。如果您无法删除此文件,请稍等,它应该稍后会消失。您可以使用trash(),这将立即删除文件,但它仍会在云端硬盘回收站中。

    【讨论】:

      猜你喜欢
      • 2013-03-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多