dongyou5098 2014-10-09 18:21
浏览 22
已采纳

是否可以为特定修订设置modifiedDate?

I am currently working on drive sdk revision upload . I can able to upload the revisions by using "NewRevision=true" , But i cant able to set a modified date for that .

$boundary = mt_rand();
$curl->setHeader("Host", "www.googleapis.com");
$curl->setHeader("Authorization", "Bearer $new_accesstoken");
$curl->setHeader("User-Agent", "CXchange-CXchange-1.0 cURL/1.11.3");
$curl->setHeader("Accept-encoding", "identity");
$curl->setHeader('Content-Type', 'multipart/related; boundary="' . $boundary . '"');
$content = '';
$content = '--' . $boundary . '
          Content-Type: application/json; charset=UTF-8

          {"modifiedDate": "' . $rev[ 'modifiedDate' ] . '"}
          --' . $boundary . '
         Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
         ' . $revison_content . '
         --' . $boundary . '--';
$curl->setHeader('content-length', strlen($content));
$rev_uploadUrl = 'https://www.googleapis.com/upload/drive/v2/files/' . $newFileId . '?uploadType=multipart&newRevision=true&convert=true';
$curl->put($rev_uploadUrl, $content);

It return successful message, But when i go to Google Drive UI and try to see the revions list in right side pane the modified time not updated as i given

Please help me to overcome this

  • 写回答

1条回答 默认 最新

  • dongzilu0178 2014-11-03 00:56
    关注

    Pass setModifiedDate=true in the query string.

    Source: https://developers.google.com/drive/v2/reference/files/update

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

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型