Drag and Drop files into a SharePoint webpart to upload into DocLibrary
Asked Answered
C

4

2

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. 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)

Any pointers would be gratefully recieved

Many thanks.

Nick

Christianechristiania answered 30/3, 2009 at 12:2 Comment(1)
Ok, well, we've done this now, and I think its probably the best way for the requirement. It's a bit messy, but, a sharepoint webpart points at a webpage with a java app on it, which recieves the file (dragged onto it), which then calls a webservice, and uploads the file to an area an area in SharePoint. Useful information (the SharePoint username, and the context in Sharepoint) is passed between SharePoint and the Java app via a cookie. I know, it's messy, but it's all inside the company, and its reliable.Christianechristiania
C
2

Well,

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.

Chung answered 30/3, 2009 at 12:7 Comment(0)
L
2

You might also want to look at another way to perform this. If you do it in a webpart, you will need to add that webpart in every sites where you want this fonctionnality to work. You might want to try Sharegate (www.share-gate.com). It's a end user tool that allows you to drag and drop file from your computer (or any SharePoint list / library) to any SharePoint library. By dropping the document inside the library, you will be ask to select a property template where you can define all the properties attach to your document. Not only you will drag and drop documents, but you will structure the information at the same time. Hope this was helpful!

Laliberte answered 19/7, 2011 at 15:4 Comment(0)
L
1

Perhaps my reply is little bit irrelevant to your post! I think upload files to SharePoint is not a painstaking job, the build-in feature is enough for us to upload files. The trouble, I think, lies in the check in process, may be that is what you should do!

Lakitalaks answered 31/3, 2009 at 2:6 Comment(1)
Thanks for the comment, but the question was how can I drag and drop files onto a webpart to load them into a document library, to get a better user experience, rather than going through all the upload clicking. Cheers anyway though.Christianechristiania
F
1

Altought maybe not that important now, but there is a SharePoint addon on CodePlex now that allows files to be uploaded by Drag & Drop into SharePoint document libraries.

Available here: http://dndupload.codeplex.com/

Works in Firefox & Chrome, uses FileApi from HTML5, supports both SharePoint 2007 & 2010.

Footstool answered 12/11, 2010 at 10:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.