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)
Thanks
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.