0

html() function not showing images

I'm using the html() function to display images held on local web server. This I am sure was working, until I changed the image filenames and now I am unable to get it to work.

I am also unable to display a local image file, so my first thought is that the html() function is foobar'd in version 3.18.3 of the MacOS app.

I see exactly this happened about 5 years ago and was subsequently fixed, but has anyone noticed this problem rearing its ugly head again?

My understanding is that this should work:-

html("<img src=""http://server:port/local/images/channeLogos/Radio.png"">")

I've tried with all combinations of quotes I can think of, but nothing is able to return that image, despite the actual URL working perfectly and e.g. Safari immediately displays the image.

Has the html() function changed in some way or is it simply broken again?

5 replies

null
    • UKenGB
    • 7 days ago
    • Reported - view

    Been playing with this some more and by changing the actual image filename to all lowercase and also in the function above, it then was actually displayed.

    Then I changed back to mixed case and although by clearing the cache of the browser, that accurately responds to what does or does not exist, Ninox however insists on displaying the image (lowercase name) that does NOT exist. I've switched records, tables, shutdown Ninox and restarted it but still showing the file that no longer exists by that name. So caching is getting in the way of troubleshooting.

    I've tried with a local file but no matter what I do, Ninox will not display it.

    So all a bit odd really and very strange that simply changing to all lowercase for the filename made it work, even though the full path is mixed case.

    Reached something of an impasse now. Anyone having success with trying to use the html() function to fetch an image?

      • Rafael Sanchis
      • Rafael_Sanchis
      • 7 days ago
      • Reported - view

       

      Look

      https://forum.ninox.com/t/60ypc12

      • UKenGB
      • 6 days ago
      • Reported - view

      Thanks, but um, not sure what sorting a list has to do with the html() function not able to find and display an image file?

    • sjames05569
    • 21 hrs ago
    • Reported - view

    That caching behavior is definitely a headache when you're trying to debug! Since you mentioned that switching to lowercase helped, it might be worth checking if your local server or the MacOS file system is treating the paths as case-sensitive, even if Safari handles it fine.

    One trick I've used in the past to 'force' Ninox to ignore the cache is to append a random query string to the image URL, like: html("<img src=""http://server:port/.../Radio.png?v=" + time() + """>"). This usually tricks the app into fetching a fresh version every time.

      • UKenGB
      • 19 hrs ago
      • Reported - view

       MacOS filesystems by default are not case sensitive and that is always how I leave it, but *nix is always case sensitive. On the whole this doesn't cause any insurmountable issues.

      The problem however is that Ninox seems unable to fetch any image that is correctly identified in the URL, with the exact same spelling (case including) as the actual image file. Yet that exact same URL, when entered in Safari always retrieves the image and also when used in another linux server (Music Assistant on Debian) also retrieves the correct image.

      So Safari on MacOS and also Music Assistant on Debian are both able to retrieve the image(s) without bother, but Ninox simply doesn't and just shows a blank space. This leads me to the conclusion that Ninox is the problem here.

      I've tried adding a query string to both remote (http://) and local (file://) URLs and neither work, with or without the query strings.

      Something so simple is proving impossible. How is anyone accessing/displaying external images in Ninox?

Content aside

  • 19 hrs agoLast active
  • 5Replies
  • 51Views
  • 3 Following