Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outlook Online, addFileAttachmentAsync does not work for inline bitmap (.bmp) images #4693

Closed
DmitryKostochko opened this issue Jul 17, 2024 · 10 comments
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins Type: doc bug Problem with the documentation (e.g., doc is out of date, unclear, confusing, or broken)

Comments

@DmitryKostochko
Copy link

We are developing an Outlook add-in for compose mode. The addFileAttachmentAsync method does not work when trying to attach a bitmap image (.bmp) with { isInline: true }.

Your Environment

  • Platform: Office on the web
  • Host: Outlook Online
  • Office version number:
  • Operating System: Windows 10/11 and macOS
  • Browser (if using Office on the web): Google Chrome, Safari

Expected behavior

The addFileAttachmentAsync method shall work.

Current behavior

The following error is returned:
{
"status": "failed",
"error": { name": "Internal Error", "message": "An internal error has occurred." }
}

Steps to reproduce

  1. Sign in to Outlook Online.
  2. Create a new message.
  3. Open the add-in’s pane and execute the following code:
    Office.context.mailbox.item.addFileAttachmentAsync('https://online-addins.ablebits.com/testaddin/image.bmp', 'image.bmp', { isInline: true }, (result) => { console.log(result); });

Pay attention to the Console tab, you will see the error there.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Jul 17, 2024
@kumarshrey-msft kumarshrey-msft added the Area: Outlook Issue related to Outlook add-ins label Jul 17, 2024
@kumarshrey-msft
Copy link

I observe the issue is not with the URI but rather with the attachment name parameter on Outlook Web, the same code with "image.png" instead of "image.bmp" as attachment name succeeds on Outlook Web for the same bmp-uri string. Thanks for reporting this issue, we have been able to reproduce it and it has been put on our backlog. We unfortunately have no timelines to share at this point.

Internal tracking id: 292566

@kumarshrey-msft kumarshrey-msft added Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Jul 18, 2024
@patilganesh-msft patilganesh-msft added the Needs: author feedback Waiting for author (creator) of Issue to provide more info label Nov 14, 2024
@DmitryKostochko
Copy link
Author

Hello @patilganesh-msft,

Please try to reproduce the issue using this code:
Office.context.mailbox.item.addFileAttachmentAsync('https://samples-files.com/samples/images/bmp/480-360-sample.bmp', 'image.bmp', { isInline: true }, (result) => { console.log(result); });

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: author feedback Waiting for author (creator) of Issue to provide more info labels Nov 14, 2024
@patilganesh-msft
Copy link

If I execute this, I see the following issue:

image

May I know what the domain of your organization and the domain of the bmp image?

@patilganesh-msft patilganesh-msft added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Nov 25, 2024
@DmitryKostochko
Copy link
Author

Domain of my organization - online-addins.ablebits.com
Domain of the bmp image - samples-files.com

I think you can try any other BMP image, e.g. hosted on your own domain.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: author feedback Waiting for author (creator) of Issue to provide more info labels Nov 25, 2024
@patilganesh-msft
Copy link

Hi @DmitryKostochko,

Understood, and we are able to repro this issue.
We will be tracking it under the tracking id: 292566.

Thank you.

@patilganesh-msft patilganesh-msft removed the Needs: attention 👋 Waiting on Microsoft to provide feedback label Dec 3, 2024
@patilganesh-msft
Copy link

Hi @DmitryKostochko,

While we look into the issue of inline support for .bmp images, here is the workaround to make it non-inline. It attaches the .bmp image successfully.

Office.context.mailbox.item.addFileAttachmentAsync('https://samples-files.com/samples/images/bmp/480-360-sample.bmp', 'image.bmp', { isInline: false}, (result) => { console.log(result); });

Thank you.

@patilganesh-msft patilganesh-msft added the Needs: author feedback Waiting for author (creator) of Issue to provide more info label Feb 19, 2025
@DmitryKostochko
Copy link
Author

Hi @patilganesh-msft,

Thank you, but we need to attach BMP images with { isInline: true }.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: author feedback Waiting for author (creator) of Issue to provide more info labels Feb 19, 2025
@patilganesh-msft
Copy link

Hi @DmitryKostochko, isIline: true is not supported as of now. We are working on to update the official documentation for the same.

@patilganesh-msft patilganesh-msft added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: attention 👋 Waiting on Microsoft to provide feedback Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown labels Feb 25, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label Mar 1, 2025
@DmitryKostochko
Copy link
Author

Hi @patilganesh-msft,

Please let me know when the official documentation is updated.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Status: no recent activity Issue or PR is stale (no recent activity) label Mar 2, 2025
@rkpathak
Copy link

@DmitryKostochko We have updated the document. Closing this, please reopen in case of any more questions.

@rkpathak rkpathak added Type: doc bug Problem with the documentation (e.g., doc is out of date, unclear, confusing, or broken) and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Outlook Issue related to Outlook add-ins Type: doc bug Problem with the documentation (e.g., doc is out of date, unclear, confusing, or broken)
Projects
None yet
Development

No branches or pull requests

5 participants