SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have sharepoint documents library and I have wcf service from where i should download new version of document file on button click.

So i got next method:

   public void UpdateFile(SPListItem item, Stream newFileStream)
       // How to update file?

And i want to change existing sp item file to new one from stream.

How to do this?

share|improve this question
up vote 2 down vote accepted

as per my knowledge you have to upload a template document with content type and metadata mapping.

so u can update the document. because document is generated based on your template.

below couple of links which helps you..

share|improve this answer
Those examples of adding new files. I want to leave existing SPListItem and just change or update file. – Evgeny Jan 16 '13 at 12:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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