Hi,
I am trying to use the REST API to call the document library and upload the files. I have verified the MSDN and got the below code
url: http://site url/_api/web/GetFolderByServerRelativeUrl('/Folder Name')/Files/add(url='a.txt',overwrite=true) method: POST body: "Contents of file" Headers: Authorization: "Bearer " + accessToken X-RequestDigest: form digest value content-length:length of post body
How we can call this code in the SharePoint page to upload the files. I am not sure how we need to get the "AccessToken" and to call this code in the sharepoint page.
If you have any sample code or reference link,please send it to me.
Thank you,
Mylsamy