简体   繁体   English

Office365 Unified Api-与特定用​​户共享文件并获取文件缩略图

[英]Office365 Unified Api - Share file with specific user and get file thumbnail

I am trying to do the following two things: 我正在尝试做以下两件事:
- Share file with specific user -与特定用​​户共享文件
- Get thumbnail for a file -获取文件的缩略图

I am currently using the Office 365 Unified Api and I'd like to keep it that way if possible. 我目前正在使用Office 365统一Api,并且如果可能的话,我希望保持这种状态。

I thought it would be possible to get the thumbnails for a file like this: 我认为可以为这样的文件获取缩略图:

"https://<tenant>.sharepoint.com/_api/v1.0/me/files/" + id + "/thumbnails"

This returns the following error 这将返回以下错误

{
  "code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
  "message": "The expression drive/items/<id>/thumbnails is not valid."
}

As for the file sharing, I have no idea where to start. 至于文件共享,我不知道从哪里开始。 I hope someone can help me out with this, thanks in advance. 我希望有人可以帮助我,在此先感谢。

The thumbnails feature is available in the v2 of the Files API - please refer to https://dev.onedrive.com/items/thumbnails.htm . 缩略图功能在Files API的v2中可用-请参阅https://dev.onedrive.com/items/thumbnails.htm The feature to share file with a specific user will be available in this API by the end of the month. 与特定用户共享文件的功能将在月底前在此API中提供。

You can find the complete documentation at http://dev.onedrive.com . 您可以在http://dev.onedrive.com上找到完整的文档。 This API is currently in preview, and general availability is planned to happen before the end of the year. 该API目前处于预览阶段,计划于今年年底之前提供一般可用性。 Please note that all new features and fixes are being added to the v2 API. 请注意,所有新功能和修复已添加到v2 API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM