Hi all,
I've been using a document viewer component within a Power App for a year or so, to display SharePoint list attachments. It was built using
Reza's guide and has been working really nicely.
However, I've recently hit a bit of a snag and I'm not sure how to resolve it. A number of my colleagues have been moved from Windows 10 to Windows 11 devices. The component itself still works fine for them, but the thumbnail image of the document is no longer visible in the viewer panel.
I'm hoping someone else may have come across this issue and figured out a way to make the thumbnail image visible.
Thanks!
Update:
I now have a bit more context regarding this issue.
Windows 11 users are able to see the relevant thumbnail image in the document viewer for all file types except pdf, pptx, docx, ppt & doc. The thumbnail for these specific file types is obtained via a call to SharePoint in the 'Image' property of the 'AttachmentImage' element of the component (see below).
If( fileExtension in [ "pdf", "pptx", "docx", "ppt", "doc" ] && IsBlank(Acceleration.X), "https://XXXX.sharepoint.com/_layouts/15/getpreview.ashx?path=" & (ThisItem.AbsoluteUri) & "&resolution=6"
On Windows 10 machines this call is completed successfully with a status code of '200 OK', but on Windows 11 machines it is declined with a status code of '403 Forbidden'.
It would be amazing if someone could help us understand what might be causing the call to be declined from Windows 11 machines and what we might be able to do to resolve the problem.