.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

question on attachments/document upload in SharePoint

Posted By:      Posted Date: August 27, 2010    Points: 0   Category :SharePoint
Scenario: I have business need where I need to attach some documents to a document library. My users fill out a form, which is a custom List Form in a list called "Request" but on the same form I want to provide my users a document upload feature which will save the document to a document library called "Request Documents".

In other words, request information such as Title, Department, Description etc get saved to "Request List" (SharePoint List) whereas the documents attached/uploaded (if there are any from the user) while filling the same request form out, get saved in the "Request Documents" (SharePoint Document Library) with the same ID #. If Request ID was 100, then the uploaded document(s) in the Document Library should also be 100.

I tried a few techniques out, and I'm reading some more on Data Source Library of SharePoint but I believe I need some help from the community before I do anything further.

View Complete Post

More Related Resource Links

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

File Attachments from info-path forms to Sharepoint document library


Hi Experts,

How to upload file attachements from info-path forms to Sharepoint document library?

I need to add attachement from local-PC/Any User to Sharepoint Document Library.


Any help please?? Appreciated




Upload documents to Sharepoint 2010 Document library

Is there a way to upload documents to an SP 2010 document library with Custom Actions or Workflows?  I have a requirement of taking the contents of several directories (older data files) and uploading them to Sharepoint.  Not sure which actions actually perform this operation.  Any help most greatly appreciated.

ASP:Upload control . Uploading into a SharePoint Document Library Subfolder and FILE NOT FOUND error

RE: ASP:Upload control . Uploading into a SharePoint Document Library Subfolder and FILE NOT FOUND error Two Issues, apparently unrelated. I have subfolders like this /ApplicantDocuments/20 and /ApplicantDocuments/21 (where 20 and 21 are my subfolders and ApplicantDocuments is my library. 1. The below function is erroring with file not found, but I confirmed I'm sending the fully qualify path (i.e c:\test.txt) to System.IO.FileStream content = System.IO.File.Open(documentFileName, System.IO.FileMode.Open); 2. Even if it worked, looking at the code, I'm not using argument foldername.  I'm passing 20 to the argument. How can I make sure it uploads into subfolder 20 of ApplicantDocuments? Thank you.     Just testing in test environment. Will tighten code once it works.   public void UploadDocumentToSite(string foldername, string documentFileName) {      SPSite siteCollection = new SPSite("https://xxxxxx");      SPWeb web = siteCollection.OpenWeb();      //SPSite.AllowUnsafeUpdates = true;      //Web.AllowUnsafeUpdates = true;      string Lib = "ApplicantDocuments";      SPFolder destFolder = web.GetFolder(Lib);      sendmail(documentFileName+" "+foldername);  

Automation of document upload to sharepoint


Hi All,

 I have some requirement, I want to upload some excel report to share poit site from an asp.net website (or windows service). can you please suggest some solution for my requirement.  

Thanks & Regards,



I want to upload Folders which contain special characters into the sharepoint document library

I want to upload Folders which contain special characters into the sharepoint document library

Sharepoint Server 2007 Document Library permission question


Is there a way to set permissions on document library where HR can see all documents but employees can only see the documents that they uploaded?

I am trying to configure permission level but can't find anything that will solve the purpose.

HR is hoping to do online enrollment and remove paper format.

Error trying to upload word .doc document to Sharepoint 3.0 Exception occurred. (Exception from HRES

We have recently moved our shrepoint WSS 3.0 site to a new server running WSS3.0 on Server 2008 R2. Since the migration everything is as it was and working ok execpt we are now unable to upload word .doc files to the site. When we try to attach a .doc file we get :

Error - Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))

Other file types ie .pdf .ptxt etc can be uploaded ok but .doc fails. I have checked blocked file types in Central administration but .doc isn't listed.

Any ideas.

Thanks in advance

Using Copy.copyIntoItems() to upload a document to SharePoint, result indicates "Success" but docume

I'm encountering a problem uploading a modified document back into SharePoint 2007 (Trial).  SharePoint is not showing the update.  I'm using Axis2 1.5 and Java.

1) I've successfully checked out the Word doc using the Lists webservice, which marks the doc in SharePoint as checked out by me.
2) I've successfully retrieved the actual document using the Copy webservice.
3) After making changes locally, I'm attempting to upload the document back into SharePoint using the copyIntoItems method in the Copy webservice.

        CopyStub stub = new CopyStub();

        Options options = stub._getServiceClient().getOptions();
        options.setProperty(HTTPConstants.AUTHENTICATE, getAuthenticator());
        // If this next statement is uncommented, the call throws an exception with HTTP/1.1 415 Unsupperted Media Type.
        //options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);

        CopyStub.CopyIntoItems copyIntoItemsRequest = (CopyStub.CopyIntoItems) getTestObject(CopyStub.CopyIntoItems.class);

        DestinationUrlCollection destUrlCollection = new DestinationUrlCollection();
        // 11/5/2009 The following needs to be a relative URI.  Don't include http://<domain>. 
        // This will eliminate the error:

How to easily add emails & attachments to particular document libraries in SharePoint



Our client would like to take a particular email they receive in Exchange / Outlook and send this to a particular location in a document library, to be made part of a client file. What woud be the best way to acheive this?

Not able to upload document after Installing the RBS on Sharepoint 2010



I have installed SharePoinr 2010 on windows server 2008 R2 64 bit. I also Installed & enabled the RBS for SharePoint 2010.

After that I will try to add document in the document library.... then it will not allow me to add. It will show me following exception

The URL 'Shared Documents/AcGenral.doc' is invalid.  It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.

Can anyone plese help me to resolve this isssue.

Thanks, TusharG [There are only 10 types of people in the world: Those who understand binary, and those who don't]

Auto upload Cognos reports to SharePoint document library with specific metadata


I want Auto upload Cognos reports to SharePoint document library with specific metadata.

Any ways to achieve?

Please help.

Multiple file upload to the sharepoint document library using file upload control inside the gridvie


how to upload multiple files to the sharepoint document library using fileupload control inside the gridview.

form design is

<asp:GridView id="gridview1" runat="server"  autogenteratecolumn="false">

<asp:TemplateField HeaderText="3DFinal">


<asp:FileUpload id ="Fileupload" runat="Server"/>



<asp:TemplateField HeaderText="2DFinal">


<asp:FileUpload id ="Fileupload2" runat="Server"/>



<asp:TemplateField HeaderText="Final">


<asp:FileUpload id ="Fileupload3" runat="Server"/>





<asp:Button Id="Buuton1" runat="server" text="Save"/>

if i click save button files should go to my sharepoint document library.

if any one know pls help me...




Using Windows Explorer to upload a folder that contains "Bin" sub folder to SharePoint Document Libr

Issue Description:
 We have a folder that has the following structure:


When going to a SharePoint (2007 SP2) document library (Shared Documents) and use Windows explorer view to upload the folder we get the following error:

\\SharePointWebApp\DavWWWRoot\SharePointSite\Shared Documents . Verify the item's location and try again"

After further testing we determined that the issue with the "Bin" folder. So, We have created a new Folder and created an empty sub folder called "bin" and we had the same issue. Other folders move fine.

We had this issue after we upgraded our environment to Windows 2008.


It seems the issue is related to Windows 2008 platform since I was able to re-produce the issue on other environments. Also, I have created a new virtual environment and installed SharePoint 2010 Beta and we had the same issue. The issue does not happen on Windows 2003 platform.

On windows 2003, we had no issues with uploading a folder that contains "bin" sub folder and users were able to access the contents (in my scenario photos and images). Now, after we moved to Windows 2008 platform, now users can't view the photos/images via t

Working with SharePoint document libraries

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

SharePoint Document Workspaces for Developers

Office 2003 is being released this month, and a cast of supporting applications is already available. One of these is Windows SharePoint Services 2.0, the free team add-on for Windows Server 2003. If you're not familiar with SharePoint Services basics, take a look at What Developers Need to Know About Windows SharePoint Services. In this article, I'm going to drill into one key place where SharePoint and Office 2003 overlap: document workspaces

SharePoint document migration challenges when migrating files and folders

There are several challenges when migrating documents to Microsoft SharePoint. While these challenges can be overcome, they are a real pain if the migration source, content and file systems are not SharePoint friendly.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend