Office365 Microsoft Graph API能否将文档复制到本地服务器?

Office365 Microsoft Graph API能否将文档复制到本地服务器?,office365,microsoft-graph-api,Office365,Microsoft Graph Api,我正在使用Microsoft Graph API将文档复制到Office 365服务器。我正在使用这段代码,它可以成功地工作 $handle = fopen($_FILES["file"]["tmp_name"], 'r+'); $stream = new GuzzleHttp\Psr7\Stream($handle); $body = GuzzleHttp\Psr7\stream_for($stream->getContents()); $token = $_SESSION['acces

我正在使用Microsoft Graph API将文档复制到Office 365服务器。我正在使用这段代码,它可以成功地工作

$handle = fopen($_FILES["file"]["tmp_name"], 'r+');
$stream = new GuzzleHttp\Psr7\Stream($handle);
$body = GuzzleHttp\Psr7\stream_for($stream->getContents());
$token = $_SESSION['access_token'];
$graph = new Graph();
$graph->setAccessToken($token);
$request = $graph->createRequest("put", '/me/drive/root:/' . $orgFileName . ':/content');
$request->attachBody($body);
$response = $request->execute();

是否有将文件复制到本地服务器的方法?

否,不在graph API中。这超出了它的范围

将文件上载到本地web服务器取决于本地应用程序对文件的期望。Graph API只知道Office365