Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Convert SharePoint 2013 REST call to ListData.svc

$
0
0

Hello All,

In SharePoint 2013, I am able to upload a file into SharePoint by using the REST interface

http://mysharepoint.com/sites/abhi_test/_api/getfolderbyserverrelativeurl('/sites/abhi_test/Foo')/Files/add(url=@p,overwrite='true')?@p='Foo.docx'

This works and I am able to create a HttpURLConnection to this and then write the stream of bytes on the connection. This successfully uploads the file in 2013.

But now I need to do the same thing on SP2010. i tried

http://mysp2010.com/sites/abhi_test/_vti_bin/listdata.svc/Foo/Files/add

but this is not valid.

So what is the REST command to add a file to a document library in listdata.svc.



val it: unit=()


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>