将文件拖放到SharePoint的WebPart上传到DocLibrary [英] Drag and Drop files into a SharePoint webpart to upload into DocLibrary

查看:252
本文介绍了将文件拖放到SharePoint的WebPart上传到DocLibrary的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能创建SharePoint(WSS3或MOSS 2007)的WebPart,让文件拖放到它上面,然后将这些文件上传到predefined文档库?

Is it possible to create a SharePoint (wss3 or MOSS 2007) webpart, to allow files to be dragged and dropped onto it, which would then upload the files into a predefined document library ?

我想,这将需要某种形式的客户端脚本(阿贾克斯?),但我在阿贾克斯的知识是有点简略。

I imagine that this would require some form of client side scripting (Ajax ?), but my knowledge in ajax is a bit sketchy.

从我的探索,到目前为止,我想:

From my exploration so far, I'm thinking:


  1. 用户拖动文件到'落区'网页组件。

  2. 这个动作触发一些code

  3. 这code加载文件到SharePoint库(这样的:<一href=\"http://stackoverflow.com/questions/468469/how-do-you-upload-a-file-to-a-document-library-in-sharepoint\">Uploading文件到SharePoint )

  1. User drags file onto 'drop zone' Webpart.
  2. This action triggers some code
  3. This code Loads the file into a SharePoint library (like this : Uploading a File to SharePoint)

任何指针将感激收到

非常感谢。

尼克

推荐答案

好了,

我会做的是,像你说的,一个Web部件使用JavaScript,允许用户拖动和一些文件拖放到web部件内的区域。一旦用户完成我将点击web部件的按钮后,上传这些文件。我认为,最好在一个唯一的事务与SharePoint工作,不使用AJAX上传和删除文件。所以,拖放功能,可以使用某种像Scriptaculous的JavaScript代码,另一个像一个典型的回发来完成。

What I'd do is, like you said, a web part with javascript that allow the user to drag and drop some files into a zone inside the webpart. Once the user has finished I'll upload those files after click on a Button of the webpart. I think is better to work with SharePoint in an unique transaction and not upload and delete files using AJAX. So, the drag and drop functionality can be done using some kind of javascript like Scriptaculous and the other one like a classic postback.

这篇关于将文件拖放到SharePoint的WebPart上传到DocLibrary的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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