Mobile App Blob/Binary Image Not Updating - Invalidate Cache Somehow?

Mobile App Blob/Binary Image Not Updating - Invalidate Cache Somehow?


I have a MySQL database connected into my OutSystems mobile app via an extension generated using Integration Studio. One of the tables has a mediumblob binary field used to store an image. The photo displays just fine in the list of records and the record detail screen, and shows and can be updated on the edit record screen. However after editing, the old image still shows. All other fields get updated when I refresh the aggregate on-save, but the image field doesn't refresh. Now when I close the app, and reload it - the new image will show, so it definitely is saving. But it's like the binary data is being cached and not refreshed when you refresh the aggregate.

My problem is this - in a web app, I could just use nocache to invalidate the image cache after an edit:

But in an OutSystems 10 mobile app, I can't find any such cache control. I can't find any way at all to make the image blob update without closing the app. This could just be a bug with the aggregate refresh - maybe it's meant to be refreshing the binary field but isn't. But if not, I can't understand how to make that happen.

This is a deal breaker, as the app flow just seems completely broken if the user uploads a new image and then the old image keeps showing. Can anybody help me understand how to resolve this?


I have exactly the same problem when refreshing an aggregate that gets binary data from the database.

Does anyone have any idea about this?´´


FWIW, I overcame this by taking the blob field off the entity altogether. I changed it to a foreign key, to a separate table that has just an ID and a blob field. The important part is that now I never overwrite a blob. I always add-only, and just overwrite the reference to point to the new blob. That way, no caching issues for the binary data itself. It does of course mean you might need to do some pruning of orphaned blob records if you don't want to retain them forever. Thankfully I had liberty to change the data structure, so this sidestep worked for me.

Hi Ian,

Can you please tell us in which version you've experienced this behavior?



For anyone still tracking this topic.

There is a change/fix done in 10.0.502.0 to allow database images to be correctly updated after being changed.

From Release Notes: "Database images are now correctly refreshed when they change. (RPD-1523)"


João Rosado