Posts

Showing posts from December, 2009

Upload documents to document library in MOSS from a asp.net web site and change Content Type.

I wasworking on a requirement that lets the users upload documents to a MOSS document library from a asp.net site. The web site is installed on a seperate server from the MOSS server. To acheive this, i am using the http:// /_vti_bin /copy.asmx web service to upload the file. There is a custom workflow attached to document library that picks the documents and processes them. The problem that i faced was that i needed to be able to change the content type of the document(the document library has multiple content types) before it is processed by the workflow. After finding out how easy it is, i was kicking myself(rightly so) for missing such an easy thing.   Basically the ContentType field is of Type "Choice", so you have to add a field of type "Choice" in your code and your are done. What is strange is that quite a number of people do not know about this and propose doing this using FrontPage RPC calls (ouch..in terms of the effort) or updating the content type afte...