I have a custom upload form that I want to incorporate with new document libraries. Ideally, user will be able to add document libraries with this updated link to their site on their own without having to use SPD.

What is the best way to modify the document library upload link? I'm open to development if that is needed.

1 Answer 1


For the upload and related links, there are 7 locations where links need to be modified:

1) Ribbon - Documents - New Document > Custom Action Hide

2) Ribbon - Documents - Upload Document > Custom Action Replace

3) Ribbon - Manage - View Properties > Custom List Definition (schem.xml) - Form

4) Ribbon - Manage - Edit Properties > Custom List Definition (schem.xml) - Form

5) ECB - View Properties > Custom List Definition (schem.xml) - Form

6) ECB - Edit Properties > Custom List Definition (schem.xml) - Form

7) "Add new item" >

  1. Custom List Definition (schem.xml) - View - XslLink
  2. XSL - Custom vwstyles.xsl

Steps 1 & 2: http://msdn.microsoft.com/en-us/library/ee537543.aspx http://msdn.microsoft.com/en-us/library/ms460194.aspx http://msdn.microsoft.com/en-us/library/ff407619.aspx

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="Ribbon.Library.Actions.ReplacementButton"
        Title="Replace a Ribbon Button">
            <!-- Hide OOTB Upload and New Document Buttons -->
            <CommandUIDefinition Location="Ribbon.Documents.New.AddDocument" />
            <CommandUIDefinition Location="Ribbon.Documents.New.NewDocument" />
            <!-- APC Upload Button -->
                <Button Id="Ribbon.Documents.New.AddDocument.ReplacementButton"
                    LabelText="Upload Document"
                    TemplateAlias="o1" />
                    CommandAction="javascript:alert('This button has been replaced.');" />

Steps 3 - 6

  <Form Type="DisplayForm" SetupPath="Layouts\MyView.aspx" Url="MyView.aspx" WebPartZoneID="Main" />
  <Form Type="EditForm" SetupPath="Layouts\MyEdit.aspx" Url="MyEdit.aspx" WebPartZoneID="Main" />

Steps 7

Essentially you'll be updating an XSL file.

Custom List Template > schema.xml > views.view.xsllink > custom_vwstyles.xsl

The blog post below walks you though all of the steps: http://byteloom.blogspot.com/2012/01/custom-upload-form-for-document-library.html


It looks like the upload page property is associated with the SPWeb not the SPList object per: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.customuploadpage(v=office.14).aspx?cs-lang=csharp

  • The step7 is not answered completely on that post... Can you provide another direction? Thanks Bruno
    – user13209
    Commented Nov 26, 2012 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.