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 Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
7,683 questions
Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
395 questions
Microsoft Graph Teamwork API
{count} votes