MSGraph Api- how to get filename of the word file when sending word file as a binary using postman

JAPNAM SINGH 81 Reputation points

Hi Team,

how do I get the filename based on{filename}:/content

while in postman because I am sending in the body as binary file and content type="text/plain" for the word file

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,503 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Danstan Onyango 3,736 Reputation points Microsoft Employee

    In the example{filename}:/content, the filename is the name of a new file. Quoting from the docs

    This example uploads the string "The contents of the file goes here." to a file in the signed-in user's drive under FolderA named FileB.txt.

    PUT /me/drive/root:/FolderA/FileB.txt:/content  
    Content-Type: text/plain  
    The contents of the file goes here.  

    In your case, the content will be the binary and filename will be something.docx.

    0 comments No comments