【问题标题】:How can I get shared link with Google Drive Api in PHP [closed]如何在 PHP 中获取与 Google Drive Api 的共享链接 [关闭]
【发布时间】:2021-02-06 12:49:27
【问题描述】:

我正在使用带有 php 的 google drive api。我确实在新创建的文件夹中上传了一个文件。但我不知道“如何获取新文件夹的共享 url”。或“我怎样才能为新的电子邮件地址授予‘读者’权限”?

我想共享文件夹。不是存档

【问题讨论】:

    标签: php api google-cloud-platform drive


    【解决方案1】:
    $result = $service->files->create(
        $file,
        array(
            'data' => file_get_contents($file_path),
            'mimeType' => 'application/octet-stream',
        )
    );
    

    文件 ID:$fileId = $result['id'];

    【讨论】:

      猜你喜欢
      • 2020-07-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多