I am doing SharePoint implementation at iPhone/iPad side. I use SOAP/REST api calls for implementing this. One of my functionalities is to upload contents to SharePoint document libraries. I use CopyIntoItems webservice in Copy.asmx API. When I upload file with a new name it is uploading successfully and content is there. But If I try to upload document with a name of document that already exist there(with the exact path), gives me response 200 and upload process completed successfully. But the content is not updated, all the properties are reflected with the new file but the file there is still the old one.

Do anyone have an idea about how can we solve this issue? Please reply if somebody have a work around.

NB: I googled for some research and it gave me "You might need to delete the existing file before uploading the new one". Is that the only solution?. Can't we overwrite an existing file directly?

4 Answers 4


No, you can't overwrite using Copy.asmx, but an alternative would be:

  • Either write a custom Web Service which does the overwrite it.
  • (As you said) delete the existing file before uploading it's new version. Of course, in such case you'll loose version history.
  • Is there anyway(methods) to overwrite a file rather than Copy.asmx (I mean List.asmx methods - CheckIn, UpdateListItems etc). I noticed that in CheckIn and UploadListItems, there is no option to specify the file stream as we do in CopyIntoItem of Copy.asmx. Can I have a way to upload to SharePoint from a mobile device. (Means iPhone/Android devices)?. Only normal SharePoint webservices are available for mobile devices I think, we can not use any desktop based Apis which run using .net code. Can I get a reply soon? Commented Jul 2, 2012 at 14:28

I was able to overwrite using Copy.asmx by putting the actual file name in the sourceUrl as opposed to the full Url. For instance if the url to the document is {servername}/sitename/documentlibrary/A0805051340561869296.txt, then just put A0805051340561869296.txt as the sourceUrl argument. This will create another version.

I removed the setting to require check out from my library, as well.


The document library can't require check out and the first parameter (sourceUrl) of the CopyIntoItems method must be the file name only (not the complete url). Works fine to me.

Good luck!


Another possible approach would be to check the document out, update it, then check the document back in. This could all be done through web services.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.