FILE ATTACHMENT API

SHABIN TC 0 Reputation points
2023-09-13T09:25:26.4533333+00:00

Hi,
I'm encountering an issue with file attachments in Microsoft Teams. The attachment process is successful, but my customer requires image file previews.

I've attached files from OneDrive to Teams, and it's working well for other file types. However, when I attach an image, it doesn't display a preview. Users can receive, download, and copy the link, but the preview is missing.

Below is the data for my API request body. Any solutions?

{
          "body": {
              "contentType": "html",
              "content": "Here's the latest budget. <attachment id=\"153fa47d-18c9-4179-be08-9879815a9f90\"></attachment>"
          },
          "attachments": [
              {
                  "id": "153fa47d-18c9-4179-be08-9879815a9f90",
                  "contentType": "reference",
                  
                  "name": "screenshot.png",
                  "thumbnailUrl" : "https://southindia1-mediap.svc.ms/transform/thumbnail?provide..." 
              }
          ]
      }
Microsoft Security | Microsoft Graph
Microsoft Teams | Microsoft Teams for business | Other
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.