我正在使用Microsoft Graph OneDrive API上载文件,直到最近才可以使用。 Microsoft API服务器返回“ 504网关超时”。有想法吗?
$tokenCache = new \App\TokenStore\TokenCache;
$accessToken = $tokenCache->getClientCredentialsAccessToken();
$graph = new \Microsoft\Graph\Graph();
$graph->setAccessToken($accessToken);
$requestUrl = "/drives/{drive-id}/items/root:/files/2019/466/466-1566268336-oYgN-subway.csv:/content";
$localPath = "/var/www/html/laravel/public/attachments/466/a3Gc9Yx0ekNzC4zIxeGyvClEJrtXGFwDJIoS0FlM/466-1566268583-PvTZ-subway.csv";
$result = $graph->createRequest('PUT', $requestUrl)
->upload($localPath);
dd($result);
Server error: `PUT https://graph.microsoft.com/v1.0/drives/{drive-id}/items/root:/files/2019/466/466-1566268336-oYgN-subway.csv:/content` resulted in a `504 Gateway Timeout` response