I have a requirement to display images from SharePoint in a gallery. A picture field won't suffice as the user must be able to attach multiple images for a record. One solution I found online was to use SharePoint attachments for the images and use the absoluteURI to point to the URL dynamically. This works perfectly and allows it to display all the attachments in a gallery, however, if the user has not previously logged into SharePoint from their browser then the images won't display. I understand this is probably due to security, but the app can already get around this as downloading the images to the hard drive is still possible through the OOB attachments control.
I am wondering if there is a way to do this without requiring logging in, similar to the how the OOB downloading functionality returns.
Could you please share a bit more about your app's configuration?
Do you add the SP list (each item has one or more attachments) as a data source within your app?
If you have added the SP list (each item has one or more attachments) as a data source within your app, I think it is not necessary to login in your SharePoint, you only need to sign in your PowerApps, the images would display within the Gallery control of your app.
If you didn't add the SP list (each item has one or more attachments) as a data source within your app and you didn't login in your SharePoint, I afraid that there is no way to display the images (acted as attachments in your SP list) within the Gallery control of your app.
Each list is a separate data source using the standard SharePoint connector. I can confirm that when this is the case as it won't display the attachments in the gallery as multiple users have attempted to do so from several devices. The only successful attempts are in the browser when the user is already logged into SharePoint.
I assume it has to do with the fact that in order to use the gallery it uses the URI and that's not going through the connector? I am a Microsoft employee (not on this team) but you can PM me to do a screenshare if necessary.
I can confirm they are separate standard SharePoint connectors for each list. We have tested on multiple devices, and the only way the images will appear in the gallery is if the user is using a web browser (not the app) and is logged into SharePoint on the same browser.
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.