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 谁能帮我挨个解读这个php语言编的代码什么意思?
  • ¥15 win10权限管理,限制普通用户使用删除功能
  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)
  • ¥65 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面