SharePoint Online: Uploading file using FrontPage Server Extenstion Put document method

Sanjay Kumar R 81 Reputation points


I am trying to upload a file to SharePoint server using FrontPage Server Extenstion Put document method. I followed the below document,

I am able to create the file successfully on the SharePoint using libcurl and postman, but I am not sure how to pass the file content in the body. Could anyone guide me how to do it?


A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,012 questions
{count} votes

Accepted answer
  1. Jerryzy 10,566 Reputation points

    Hi @Sanjay Kumar R ,

    The File Content in the request body should be the file binary stream data, in PostMan, you can select a specific file and will automatically convert as binary data, you can test it.

    Here is the summary to upload a file:

    POST https://{site_url}/_api/web/GetFolderByServerRelativeUrl('/Folder Name')/Files/Add(url='{file_name}', overwrite=true)  
    Authorization: "Bearer " + accessToken  
    Content-Length: {length of request body as integer}  
    X-RequestDigest: "{form_digest_value}"  
    Contents of binary file  


    And before uploading file, it's necessary to get request digest value and use as X-RequestDigest in request header, here is a blog with detailed steps, I suggest you can refer for detailed information:

    SharePoint Online remote authentication (and Doc upload)

    Best Regards

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful