Martin Harwar (Content Ma
Guest
|
Posted:
Thu Jan 06, 2005 10:39 pm Post subject:
RE: Uploading Documents to SPS2003 |
|
|
Hi
I don't think you can pass the metadata at the same time, unfortunately.
"mzam" wrote:
| Quote: | Hi All,
I am programmatically uploading documents to a Document Library in SPS2003.
The problem I have is that right after adding the document I start updating
the documents metadata and this causes a new version every time a metadata
is updated. I would like to avoid this, Is there a way to pass all the
metadata when the document is being added? Here is my code:
SPSite workingSite = new SPSite(myUrl);
SPWeb workingWeb = workingSite.OpenWeb();
SPFile newFile = workingWeb.Files.Add(myUrl, fileContents);
SPListItem listItem = workingFile.Item;
listItem["MyProperty"] = propertyValue["SomeValue"];
listItem.Update();
Thanks
|
|
|