我们使用 Java SDK 首先创建一个上传会话,然后上传文档。我们目前正在上传 10 MB 的块(根据公共文档的建议:https ://docs.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0 ),但我们是注意到每个块大约需要 10 秒。
根据 SDK 记录的内容,时间似乎被网络占用了。
这是上传块时的日志片段:
13-Jan-2020 02:41:23.503 INFO [http-DS0-1364-37-1578883281173] com.microsoft.graph.logger.DefaultLogger.logDebug Starting to send request, URL https://obfuscated.com/sites
/blur/_api/v2.0/drives/12345/items/12345/uploadSession?guid='blur'&path='blur.docx'&overwrite=False&rename=True&dc=0&tempauth=blur
13-Jan-2020 02:41:23.504 INFO [http-DS0-1364-37-1578883281173] com.microsoft.graph.logger.DefaultLogger.logDebug Request Method PUT
13-Jan-2020 02:41:23.504 INFO [http-DS0-1364-37-1578883281173] com.microsoft.graph.logger.DefaultLogger.logDebug Sending byte[] as request body
13-Jan-2020 02:41:33.018 INFO [http-DS0-1364-37-1578883281173] com.microsoft.graph.logger.DefaultLogger.logDebug Response code 202, Accepted
13-Jan-2020 02:41:33.018 INFO [http-DS0-1364-37-1578883281173] com.microsoft.graph.logger.DefaultLogger.logDebug StatefulResponse is handling the HTTP response.
13-Jan-2020 02:41:33.018 INFO [http-DS0-1364-37-1578883281173] com.microsoft.graph.logger.DefaultLogger.logDebug Chunk bytes has been accepted by the server.
13-Jan-2020 02:41:33.019 INFO [http-DS0-1364-37-1578883281173] com.microsoft.graph.logger.DefaultLogger.logDebug Deserializing type UploadSession
这是预期的吗?有什么方法可以更快地执行上传吗?