如何建立类似的OneDrive文件/文件夹结构? [英] How can I build a similar structure of files/folders of OneDrive?

查看:112
本文介绍了如何建立类似的OneDrive文件/文件夹结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在Mysite中启用了OneDrive,人们开始上传文件.

我需要在Web应用程序主页中显示员工的OneDrive的所有文件/文件夹.我开始使用REST API为OneDrive的文档在CSOM和JS中进行编码,但是在提供文件夹/文件结构时却变得复杂了吗? 是否有现成的代码可以满足这一需求?还是有更好的方法?
谢谢.

I have enabled OneDrive in mysite and people have started uploading files.

I need to show all the files/folders of OneDrive of an employee in the web application home page. I started coding in CSOM and JS using REST api for the documents of OneDrive but getting complex in providing the folder/files structure the same way as it appears? Is there a ready code to meet this need? Or there is a better way?
Thanks.

推荐答案

如果您想通过REST API使用JavaScript来实现它,我们可以使用带有REST API的jQuery Ajax获取数据,然后使用一些jQuery插件来构建数据表,例如在OOB列表视图中.

If you want to use JavaScript with REST API to achieve it, we can get the data using jQuery Ajax with REST API, then using some jQuery plugins to build a datatable like in the OOB list view.

http://sp2013/my/personal/administrator/_api/web/lists/getByTitle('Documents')/items?


select = FileLeafRef, File_x0020_Type,文件/名称,文件/标题,文件/ServerRelativeUrl&
select=FileLeafRef,File_x0020_Type,File/Name,File/Title,File/ServerRelativeUrl&


expand = File
expand=File

jQuery的DataTables插件

DataTables plug-in for jQuery

https://github.com/DataTables/DataTables

在内部SharePoint中,建议您自定义一个Web部件以实现它.

In SharePoint on- premise, I suggest you customize a web part to achieve it.

https://code.msdn.microsoft.com/office/Ejemplos -sobre-cmo-usar-el-69cd5f16

最好的问候,

丹尼斯


这篇关于如何建立类似的OneDrive文件/文件夹结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆