Using pturmel's BLOB module and the Perspective app on Android

Morning, I am using pturmel's Blob Module (works wonderfully...I'll be sending a tip!!) Thank you, sir.

I have this set up and it works well with PDF's and PNG's using the file upload and image or PDF viewer from the developer or a Windows web client. PDF's work on an Android tablet but PNG's do not render on the tablet. PDF's display as expected.

I can confirm that the tablet can capture images from the tablet's camera (hoorah!!) so that if I take a picture with the tablet I can render it on my desktop machine.

Does anyone have an idea on how to correct this? The capability to display PNG blobs on the tablet would be quite useful.

Any and all help is much appreciated. Thanks!!

What content type are you using?

Morning, Phil. Here's a clip of the query:

Well, PNG files need image/png, not image/jpeg.

You need another column in your images table to hold the content type from when you upload them.

(Your column name ContentType almost certainly needs double quotes, not single quotes. Column names are identifiers, not values.)

Thanks! Sorry, I was using jpeg's and not png's. Not enough coffee yet, I guess.

Your suggestion to add ContentType to the DB is a good one, and I've implemented it. Here's another couple of screen shots:

Works in the developer and a Windows Chrome web session, but does not render on Android.

Thanks you again!!

Maybe an Android version issue?

I wondered that as well. Weird, though. Even if I try using the tablet and viewing from Chrome instead of the Perspective app....the pictures won't render.

I'm no Android expert and I expect you aren't either, but I'll give some details of the tablet in case anyone else has some experience with this.

Samsung Galaxy Tab S6 (don't's for testing!!) with Android V 14 and One UI version 6. Interestingly, I just tried the Perspective app and Safari on a IPhone and the picture still doesn't render. Grrrrr!!!

IT issue? Are the mobile devices on a different VLAN or something inside a corporate environment? Weird that they'd be able to access the rest of the project fine, but :person_shrugging:

1 Like

Ya beat me to it by a minute or two!! This is an IT issue....the DNS was not resolving. If I point the project at the IP rather than server name it works.

Hmm...time for another ticket. Probably some 'security enhancment' I wasn't aware of...

Thank you both. This could be really handy in this particular application...QC Inspection reporting!!!


Since ya'll have been so helpful, here's another question (not specific to Android).

I'm currently using this module to upload/display a single image of product defects. On one page I have a Image Viewer and a file upload. I'd like the image to refresh after an upload (say, an updated pic).

On the file upload button onFileReceived event I have some code which checks if a current record id exists, and if so deletes it and insert a new blob record. This all works as observed in the database.

The image viewer is named image, and the last line of my onFileReceived script I have this: self.refreshBinding(self.parent.parent.parent.getChild("FlexContainerImage").getChild("Image").props.source)

The image does not refresh. What the heck am I doing wrong?

Thanks again, Phil. This module will add a lot to our projects!!

You are re-using record IDs. Don't. It breaks the caching needed for performance across the entire stack (in Ignition's NQ system, in your network, and in your browser).

Instead, insert new images with new IDs. Prune old IDs as needed. Update references to the old ID to point at the new ID. Then tell your image component to refresh its URL to the new ID.

Thank you once again...duh!!! Sometimes you stare at a problem to long at it becomes 'invisible'.

I'll get to work on this... I need to clean up this project for production anyhow!!