views:

51

answers:

1

When I copy to a sharepoint document library using webclient, should the URL contain the destination filename or not?

For example:

client.UploadFile("http://site/projects/project/documentLibrary/subfolder/" , "PUT", attachmentFileName );

or

client.UploadFile("http://site/projects/project/documentLibrary/subfolder/" + attachmentFileName , "PUT", attachmentFileName );

Can't figure out which one works - because right now neither work for me

+1  A: 

The URL MUST include the destination path.

The issue I was facing was easy to overlook, I was including the full file path in the URL, not just the file name.

JL