Witcher
Witcher

Reputation: 1140

Check out and check in a document from a Sharepoint doc-library using c#

How to write such interaction for a SharePoint document-library:

open file -> check out file

library -> download file -> editing -> updload file

library -> check in

Upvotes: 0

Views: 584

Answers (1)

oglester
oglester

Reputation: 6655

You'll need to open the SPItem for the given file, and that is after you open the containing Document Library.

So, the loose pseudo is something like

  • Open Site Open Web within site
  • structure Open List / SPDocumentLibrary in Web
  • Open Item in List
  • Reference Item.File
  • Checkout
  • Get file stream and save it to disk
  • Do edits
  • Add file back
  • Check-in

Upvotes: 1

Related Questions