OOlashyn / PCF-AttachmentGalleryControl

Attachment Gallery Control using Powerapps Component Framework
MIT License
26 stars 11 forks source link

Not able to view attached files #11

Closed jade7669 closed 3 years ago

jade7669 commented 3 years ago

Hi there,

I have used your Gallery Control and noticed that sometimes the image (no matter png or pdf) will not show up on the Gallery view. I then noticed that the ones show up contains image or pdf icon, when the other ones that don't show are with attach icon. What do I need to do to fix this? gallery issue

OOlashyn commented 3 years ago

Hi @jade7669,

To make sure that I am showing only images and pdf files when I query attachments I prefilter them by mime-type to only get the one that has application/pdf or image/ in the mimetype field. I assume that for some reason system cannot recognize that files that you attaching are images and my component skips them during fetching. I saw a similar issue previously when one user was adding attachments via Power Automate and wasn't setting mime-type field properly. Can you check what mimetype does your attachments have to verify if this is what causes the issue? For now, there is no possibility to disable this prefiltering. I am working on the new version of the component that I hope I will release soon where I will add the possibility to use custom filters or to disable default one.

jade7669 commented 3 years ago

Thank you for your reply and that was definitely right on target! It turns out that I didn’t set the mime-type correctly in the Power Automate and that's the one that's not showing up. Once it’s fixed, I am able to see the attachment with the correct icon and is able to show in the attachment gallery!