You are currently offline, waiting for your internet to reconnect

Updating file stream via Object Model creates versions and updates metadata

Summary
Consider the scenario where you have a SharePoint site having a document library with versioning enabled on it. In such a case, when you use the SharePoint Object Model (OM) to update the file stream of a document stored in the document library, you notice that an additional version of the file gets created. Moreover, the metadata/user properties (e.g. ModifiedBy, LastTimeModified) of such a file gets changed. Additionally, you notice that you are not allowed to update the historical/previous versions of the document.
More information
This behavior is By Design.
  1. SharePoint OM does not expose a public API to edit the content stream of a file and force not creating a new version.
  2. SharePoint OM does not expose a public API that allows to update the stream of a current version of a file in a way that does not change the metadata/user properties.
  3. The design of a number of SharePoint features depend on never changing historical document versions.
  4. For virus cleaning scenarios, we recommend that you use the VSAPI to update the clean document streams (for current versions) into SharePoint. Historical versions which are reported as infected are marked internally as such and are not accessible anymore.
VSAPI; historical; version; metadata;
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.
Properties

Article ID: 2833705 - Last Review: 04/23/2013 05:46:00 - Revision: 3.0

Microsoft SharePoint Server 2013, Microsoft SharePoint Server 2010

  • KB2833705
Feedback