none
Drag and Drop upload for Lists

    Question

  • I've done a few searches for this topic and I have been unable to find an answer. We have developed a fairly simple sharepoint site for keeping track of procurement projects. We are ulitizing Lists as a way to keep track of projects and we are uploading documents into each individual list as a way of ulitizing a simple Document Management System. The problem is, I frequently have to upload multiple files, but Sharepoint as it stands today doesn't allow me to drag and drop files into lists.

    Is there a third party, piece of code, or an option we can ulitize to allow drag and drop uploading for Lists?

    Thanks!



    Tuesday, April 10, 2012 3:20 PM

Answers

  • As I have recently done this, believe me when I say you can attach a series of files to a list item with the Attachments collection.

    In our case, we had a recruiment app we built to keeping track of candidates, the candidate's data was entered as a single list item, and then we used the attachements collection to store information like resume, picture, and other files associated to the individual.

    In order to enable the multi-file upload, we used the SPListItem.Attachments collection, and in our case we used a Telerik radGrid  to compile the list of files to be uploaded, and when the user clicked save we loaded each file into the attachment collection using the .add() method.

    If you want to enable "drag-and-drop" type functionality, I would suggest creating a silverlight control that mimics the drag and drop interface that will compile a list of files that will be uploaded, and then you can follow some of the example code here: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spattachmentcollection.aspx to get that list of files that were dragged into the user interface into your attachements collection all in one go.

    Tuesday, April 10, 2012 8:55 PM
  • Each item in a document library would be an individual file with a unique file name.  You could look at using a "Document Set."

    Chris Caravajal MCTS SharePoint911 Consulting & Support Services

    Tuesday, April 10, 2012 8:29 PM

All replies

  • It would be a bit of a pain, but you could write a customized new/edit forms for the list and for the file attachment section use a silverlight control.  I don't think jQuery will work in this case due to browser security restrictions.  here is a walkthrough for creating drag and drop silverlight: http://www.codeproject.com/Articles/75479/Silverlight-4-Drag-and-Drop-File-Manager

    Tuesday, April 10, 2012 3:56 PM
  • SharePoint 2010 already contains an ability to upload files by drag&drop (you need to have Silverlight installed (on client)):

    Also (for example, if you use SharePoint 2007), you can use third-party solutions: Drag & Drop upload for SharePoint or Silverlight Multi File Uploader.


    Don't happy, be worry...


    • Edited by Aviw_ Tuesday, April 10, 2012 4:05 PM
    Tuesday, April 10, 2012 4:04 PM
  • Hello,

    I am a bit confused.  "Lists" contain lines of data.  You can attached physical files to list items, but you can't upload physical files to a list.  Physical files are stored in "Document Libraries" in SharePoint.  In a Document Library, you can open the library in Explorer View and there you will be able to drag and drop as many files as you like, given the default (or adjusted limit if you have made changes to your server settings) 50 MB total upload limit.  You can also use the Upload Multiple Documents option in the ribbon.

    Can you please provide some more information on what you are trying to do?


    Chris Caravajal MCTS SharePoint911 Consulting & Support Services

    Tuesday, April 10, 2012 4:06 PM
  • SharePoint 2010 already contains an ability to upload files by drag&drop (you need to have Silverlight installed (on client)):

    Also (for example, if you use SharePoint 2007), you can use third-party solutions: Drag & Drop upload for SharePoint or Silverlight Multi File Uploader.


    Don't happy, be worry...



    Except it doesn't work for uploading files to a List item.
    Tuesday, April 10, 2012 6:33 PM
  • It would be a bit of a pain, but you could write a customized new/edit forms for the list and for the file attachment section use a silverlight control.  I don't think jQuery will work in this case due to browser security restrictions.  here is a walkthrough for creating drag and drop silverlight: http://www.codeproject.com/Articles/75479/Silverlight-4-Drag-and-Drop-File-Manager


    Would that work?
    Tuesday, April 10, 2012 6:34 PM
  • Hello,

    I am a bit confused.  "Lists" contain lines of data.  You can attached physical files to list items, but you can't upload physical files to a list.  Physical files are stored in "Document Libraries" in SharePoint.  In a Document Library, you can open the library in Explorer View and there you will be able to drag and drop as many files as you like, given the default (or adjusted limit if you have made changes to your server settings) 50 MB total upload limit.  You can also use the Upload Multiple Documents option in the ribbon.

    Can you please provide some more information on what you are trying to do?


    Chris Caravajal MCTS SharePoint911 Consulting & Support Services


    We have already implimented a simple procurement system to keep track of each purchase and its documentation under Lists. Each List line item contains several rows of data such as Purchase Order #, Status, Vendor Name, Title of Procurement, Order Date, Item Type, End Date, Order Total, Account Code, Renewed (Yes/No), Attachments, and notes.

    Instead of keeping all your files for each procurement in a folder on a harddrive or whatever, you can use sharepoint Lists to keep all your files for you, except the problem is you have to upload a file one at a time. Uploading files one at a time is cumbersome. It would be much easier if you could drag and drop files instead of clicking attach, then going to browse, then clicking ok, then uploading. Whereas, doing drag and drop would be easier.

    Does that make sense?

    Tuesday, April 10, 2012 6:34 PM
  • I'm afraid not. 

    SharePoint stores content in two types of repositories:  Lists and Libraries.  Lists store line items of data, but each item can have physical files attached to it.  List items can have metadata columns associated with them to collect additional information abouut the items.  Document libraries store physical file items which can have metadata columns associated with them.  Which are you using for this business case?

    If you are using lists to contain information, you can attach physical documents to a list item, but this has to be performed one at a time.  If you are using a document library to contain this information you have two methods for uploading multiple files at one time:  "Upload Multiple Documents" option in the ribbon and/or you can open the library in Explorer View and drag and drop your files that way.  Anytime you are uploading files, you have to remember that there is a default upload limit of 50 MB.  If you try to upload one or more files, and the sum of their sizes is greater than 50 MB, the upload will error out.  You can modify this 50 MB limit at the SharePoint server by accessing the Central Administration website.

    Long story short, there are two ways to upload multiple documents into SharePoint libraries.  If you do not see these options when you are looking at the Library ribbon tab, than something is wrong.  If these options are grayed out, than you have to take a look at your operating system version and make sure you have the latest updates. 


    Chris Caravajal MCTS SharePoint911 Consulting & Support Services

    Tuesday, April 10, 2012 8:15 PM
  • Hi David,

    The drag-and-drop or multiple upload feature is not available for a "Lists" item... as far as I know.  I have gone thru a similar request.  We ended up creating a document library from scratch using the same metadata.

    To do what you need, custom code my be needed.

    Tuesday, April 10, 2012 8:20 PM
  • Hi David,

    The drag-and-drop or multiple upload feature is not available for a "Lists" item... as far as I know.  I have gone thru a similar request.  We ended up creating a document library from scratch using the same metadata.

    To do what you need, custom code my be needed.


    Ahh, that makes sense. I had tried to find something that would work and the List feature gets me 70-80% of the way there. Can a document library handle multiple files per item?
    Tuesday, April 10, 2012 8:28 PM
  • Each item in a document library would be an individual file with a unique file name.  You could look at using a "Document Set."

    Chris Caravajal MCTS SharePoint911 Consulting & Support Services

    Tuesday, April 10, 2012 8:29 PM
  • As I have recently done this, believe me when I say you can attach a series of files to a list item with the Attachments collection.

    In our case, we had a recruiment app we built to keeping track of candidates, the candidate's data was entered as a single list item, and then we used the attachements collection to store information like resume, picture, and other files associated to the individual.

    In order to enable the multi-file upload, we used the SPListItem.Attachments collection, and in our case we used a Telerik radGrid  to compile the list of files to be uploaded, and when the user clicked save we loaded each file into the attachment collection using the .add() method.

    If you want to enable "drag-and-drop" type functionality, I would suggest creating a silverlight control that mimics the drag and drop interface that will compile a list of files that will be uploaded, and then you can follow some of the example code here: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spattachmentcollection.aspx to get that list of files that were dragged into the user interface into your attachements collection all in one go.

    Tuesday, April 10, 2012 8:55 PM
  • As I have recently done this, believe me when I say you can attach a series of files to a list item with the Attachments collection.

    In our case, we had a recruiment app we built to keeping track of candidates, the candidate's data was entered as a single list item, and then we used the attachements collection to store information like resume, picture, and other files associated to the individual.

    In order to enable the multi-file upload, we used the SPListItem.Attachments collection, and in our case we used a Telerik radGrid  to compile the list of files to be uploaded, and when the user clicked save we loaded each file into the attachment collection using the .add() method.

    If you want to enable "drag-and-drop" type functionality, I would suggest creating a silverlight control that mimics the drag and drop interface that will compile a list of files that will be uploaded, and then you can follow some of the example code here: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spattachmentcollection.aspx to get that list of files that were dragged into the user interface into your attachements collection all in one go.


    I don't have any other way to confirm this, but it would appear this is the answer?
    Tuesday, April 10, 2012 9:14 PM
  • Document library treats each library as a single item.  So the answer is no.

    What you can also try is the new Document Set feature in Sp2010.  This may do what you want.  Please google DocumentSet and you will find tons to how-tos.


    • Edited by Ultragc88 Friday, April 13, 2012 3:40 AM
    Wednesday, April 11, 2012 7:22 PM
  • Document Libary will not work for what you want.

    SPListItem.Attachments will but will require a bit of additional coding for the upload and display.

    please review: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spattachmentcollection.aspx

    • Proposed as answer by RobertSm Thursday, April 12, 2012 3:08 PM
    Thursday, April 12, 2012 3:07 PM