使用JSOM / ECMA Script创建与文档library- folder-sub文件夹相同的文件夹结构 [英] Create the folder structure same as document library- folder-sub folder using JSOM/ECMA Script

查看:68
本文介绍了使用JSOM / ECMA Script创建与文档library- folder-sub文件夹相同的文件夹结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SharePoint 2010网站,它有很少的文档库,这些doc.libs有多个文件夹结构,这些文件夹再次包含子文件夹,它有100个文档(pptx,docx, xlsx,txt和outlook消息文件)。


我想使用JSOM / ECMA脚本以编程方式将相同的结构下载到我的文件系统(在D:\ drive / desktop中) 。


注意:我无法使用visual studio进行此开发,因为我无法访问prod.server。我必须使用的唯一选择是内容编辑器Web部件和记事本



 

解决方案

< blockquote>


我建议您使用OOB Open with Explorer满足此要求。





我尝试了一些JavaScript方法,而它是一个棘手的案例。


我们目前可以通过copy.asmx获取文件流,但由于安全性,我们无法指定将文件保存到本地的路径。


https://stackoverflow.com/questions/15325640/ window-url-createobjecturl-with-file-path-parameter


https:// stackoverflow。 com / questions / 23451726 / saving-binary-data-as-file-using-javascript-from-a-browser





最好的问候,



I am having a  SharePoint 2010 site and it has few document libraries and these doc.libs are having multiple folder structure and these folders contain sub folders again and it has 100 s of documents (pptx, docx, xlsx,txt and outlook message files).

I would like to get the same structure downloaded into my file system (either in D:\drive /desktop ) programmatically using JSOM/ECMA Script .

note : i cant use visual studio for this development as i dont have access to prod.server. The only option i have to use is content editor web part and notepad

 

解决方案

Hi,

I would suggest you use OOB Open with Explorer for this requirement.


I tried some approaches with JavaScript while it’s a tough case realy.

We can get file stream by copy.asmx currently, while we can’t specify the path to save the file to local due to security.

https://stackoverflow.com/questions/15325640/window-url-createobjecturl-with-file-path-parameter

https://stackoverflow.com/questions/23451726/saving-binary-data-as-file-using-javascript-from-a-browser


Best Regards,

Lee


这篇关于使用JSOM / ECMA Script创建与文档library- folder-sub文件夹相同的文件夹结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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