web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

HTML is not displaying attachment properly

(0) ShareShare
ReportReport
Posted on by 10

Hello,

I have one custom ribbon button which displays the html page with all related attachments.

In click of one view button the attachment displays in IFrame. but for some of the images its not displaying.

I have refer the below link for this process.
https://mahadeomatre.blogspot.com/2016/10/view-or-download-attachments-for.html

Can any one help me with the same?

Any help would be appreciated. 

I have the same question (0)
  • Pankaj Gogoi Profile Picture
    3,177 on at
    RE: HTML is not displaying attachment properly

    Hi Jalak,

    Is it happening with specific browser? Check the console if it is logging any error and also check the network tab for the images path that you are trying to load.

    Can you try using the openWebResource method?

    docs.microsoft.com/.../openwebresource

    Best Regards

    PG

  • Jalak Profile Picture
    10 on at
    RE: HTML is not displaying attachment properly

    No its not browser specific issue. I used openWebResource method only.

    After opening it, for some attachment its working fine and for some its not loading in IFrame.

  • Pankaj Gogoi Profile Picture
    3,177 on at
    RE: HTML is not displaying attachment properly

    Hi Jalak,

    Can you put a breakpoint in showdata function and get the url and copy it to a separate window and see if it loads.

    Check if there is a cross domain issue with failed attachements. Also check if it is a permission issue.

    Hope this helps.

    Best Regards

    PG

  • Suggested answer
    cloflyMao Profile Picture
    25,210 on at
    RE: HTML is not displaying attachment properly

    Hi Jalak,

    Please check whether base64 string is valid by copying all text in src property of img with inspector.

    https://jaredwinick.github.io/base64-image-viewer/

    https://base64.guru/converter/decode/image

    In addition, you could also try those custom controls to display image attachments.

    https://pcf.gallery/gallery-control/

    https://pcf.gallery/attachment-gallery/

    Regards,

    Clofly

  • cloflyMao Profile Picture
    25,210 on at
    RE: HTML is not displaying attachment properly

    Hi Jalak,

    Have you solved the issue successfully?

    Regards,

    Clofly

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 60 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 36 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans