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

Announcements

No record found.

News and Announcements icon
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. 

  • Pankaj Gogoi Profile Picture
    3,177 on at

    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

    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

    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

    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

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Travis South Profile Picture

Travis South 54

#2
11manish Profile Picture

11manish 33 Super User 2026 Season 2

#3
Syed Aqib Raza Profile Picture

Syed Aqib Raza 31

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans