Upload a file to SharePoint through the built-in web services

后端 未结 7 848
悲&欢浪女
悲&欢浪女 2020-11-27 03:37

What is the best way to upload a file to a Document Library on a SharePoint server through the built-in web services that version WSS 3.0 exposes?

Following

相关标签:
7条回答
  • 2020-11-27 04:44

    There are a couple of things to consider:

    • Copy.CopyIntoItems needs the document to be already present at some server. The document is passed as a parameter of the webservice call, which will limit how large the document can be. (See http://social.msdn.microsoft.com/Forums/en-AU/sharepointdevelopment/thread/e4e00092-b312-4d4c-a0d2-1cfc2beb9a6c)
    • the 'http put' method (ie webdav...) will only put the document in the library, but not set field values
    • to update field values you can call Lists.UpdateListItem after the 'http put'
    • document libraries can have directories, you can make them with 'http mkcol'
    • you may want to check in files with Lists.CheckInFile
    • you can also create a custom webservice that uses the SPxxx .Net API, but that new webservice will have to be installed on the server. It could save trips to the server.
    0 讨论(0)
提交回复
热议问题