[Solved] How do we call `show_file` from WebSocket API?

Hello,

I’d like to play around with custom images.

I’m able to upload custom images with the web interface and display it on screen via Block code. However, whenever I try to call show_file using the Python WebSocket API library, it just shows a blank screen.

I saw that the block code seems to use the IMAGE1…IMAGE10 constants. The WebSocket API needs us to provide a filename. I matched the filename to the one I’ve uploaded but it doesn’t really work. I can see that there’s a requirement to be a bmp or png file. I’ve followed that constraint too.

Not sure if the image gets renamed on upload.

If anyone knows how this works, would love to hear from you!

Thanks in advance!

Literally within a minute of posting, I just tried different variations of the filename.

Seems like the files are renamed image1.png etc…

Hope this helps someone else out in the future.

Thanks for the information!

@Jenna_Juechter This looks like something that needs added and explained in the API. Something to look into at the very least :slight_smile:

2 Likes