I think this is a bug, but would like to know if anyone can reproduce this and perhaps suggest a workaround or tell me if I'm doing something wrong 🙂
Issue:
My app is communicating with sharepoint lists and it is sometimes used to upload attachments to a list item. If a file has been previously uploaded with the name e.g. 'Summary report.pdf' to another item, the old file is persistent when attempting to upload a new attachment to another list item as long as the name is the same.
I have only tested/experienced this using the same list.
This seems to be only affecting powerapps running on iOS, the behavior is not present using a browser on a computer.
Reproduction steps on iOS "pictures of animals" example:
1. List: "Animals" -> Item: "Dog" -> Upload picture of a DOG named 'Picture1.jpg' to item attachments
2. List: "Animals" -> Item: "Cat" -> Upload picture of a CAT named 'Picture1.jpg' to item attachments
Result: Item: "Cat" attachment "Picture1.jpg" is a picture of a dog ;(
If using a picture to test on iOS, the picture must be saved with "Files" in different folders for the filenames to be identical. Use the file browser on iOS when uploading the attachments.
Hints:
Clearing the cache on the iOS PowerApps-app, seems to correct it.
I suspect that this issue is known by the developers, because when attaching images from iOS pictures the attachment naming convention is UUID by default.