Hosting a binary file

2
I have a GLB file hosted on an external site, which is a 3D image file. It can easily be viewed/rendered in the browser with a new model-viewer html ta as such: <model-viewer    src="https://modelviewer.dev/shared-assets/models/Astronaut.glb"   alt="A 3D model of an astronaut"   auto-rotate   camera-controls> </model-viewer>   It renders perfectly. The problem is, I don’t want outside hosted GLB’s. I want to be able to upload my own GLB files on our own Mendix website. Is there a way to accomplish this? This is one of the more problematic things I’ve come to experience with mendix. If I want something like a simple JPG to display, I have to load the JPG into an image collection, drop an image widget onto the page, reference it, and then when it renders it’s a completely random, dynamic URL that is in no way predictable. So whether it’s an IMAGE tag with a JPG or a MODEL-VIEWER tag with a GLB or any other binary file, I can’t just drop a precitable URL into an HTML tag. I understand Mendix is low code and this sort fo defeats the purpose, but there are times you have an application that Mendix can handle well, but it just needs one advanced feature like this and I’d hate to have to take an application I’m building and seperate it into two different apps: One mendix for the “simple” stuff, and one in something like ASP.NET to handle more advanced stuff like this.
asked
1 answers
1

Uploaded files and images have there own path, for example

 

http://localhost:8080/file?guid=1970324836974593

Some options can be used to get this in the html

  1. Develop a custom widget
  2. An adapted version of the HTML snippet widget which allows parameter passing from context. But that is not available from the appstore now.

The only option left is the

javascript snippet for mendix 8 widget https://marketplace.mendix.com/link/component/113004

But with that you use some extra javascript to add your html into the page. Not really elegant, but maybe the easiest for now.

answered