Wednesday, December 19, 2007

Uncheck "Add as a new version to existing files" checkbox on Upload.aspx in MOSS 2007

Steps listed below require modifying the original MOSS files and may be unsupported. Be sure to backup original and modified files.

I was recently asked by my client to have the Add as a new version to existing files option on the upload pages to be "unchecked" by default. This can come in handy on multiple file upload process. Multiple file upload process doesn't "complain" and silently overwrites or ignores existing files.

Unlike v2/2003, this is very easy to do in MOSS/WSSv3:
  1. Open the file Upload.aspx in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\

  2. Locate following tag:
    <asp:CheckBox id="OverwriteSingle" Checked="false" Text="<%$Resources:wss,upload_document_overwrite_file%>" runat="server" />

  3. Change Checked="true" to Checked="false"

  4. Do the same for the OverwriteMultiple tag:
    <asp:CheckBox id="OverwriteMultiple" Checked="false" Text="<%$Resources:wss,upload_document_overwrite_version%>" runat="server" />

  5. Save the file (no IISRESET needed)

3 comments:

Stowner said...

Ahmed,
Thanks for the super helpful tip. You rock.

Stowe

ruselw said...

I concur, Ahmed rocks. This tip was just what I needed.

Gaby said...

I've tried it and the box remains cheched, is it something I am missing?