I have this Gallery and a tab sitting on top of the gallery. This tab has a file upload control that I stole from a form in another screen. I did this because I am using the file upload control function to upload a file and trigger a flow in automate that uploads the file with meta to a sharepoint directory.
This is in my file control OnAddFile:
fileUpload.Run(Project.ID,{file:{contentBytes: Last(DataCardValue89_1.Attachments).Value, name: Last(DataCardValue89_1.Attachments).Name}});
Refresh('PSI - DIRECTORY');
Reset(DataCardValue89_1);
The file upload works fine, but the gallery does not refresh to show the new file. However, If I add another file the same way right after this, it will show the first uploaded file and not the current file I am trying to upload. The same behavior keeps going every time I upload a file, the previous one shows up. So it's not refreshing real time.
The gallery is fetching directly from data source with this:
Filter('PSI - DIRECTORY', fk_projects = Project.ID)
I've read somewhere someone fixed this by doing the refresh and reset of the form. But this isn't a form since I just took the file upload control only and did the functionality with automate.
Any ideas?