App Dev - Image - where to store in deployed app

Discuss PC Developer and Web Developer projects and features here.
Post Reply
jay_dee
Posts: 229
http://meble-kuchenne.info.pl
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 91 times
Been thanked: 58 times

Flowcode v10 App Dev - Image - where to store in deployed app

Post by jay_dee »

Hi, I have placed an image into a demo AppDev. When I deply the program, the image is missing.
Where should the image be stored to ensure I can deploy the app, independantly of the enviroment used to develop the program.
I tried dropping the image in the root of the AppDev program but this did not make any difference.

I'm sure its something simple I am missing. Thanks, J.

Steve-Matrix
Matrix Staff
Posts: 1547
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 214 times
Been thanked: 361 times

Re: App Dev - Image - where to store in deployed app

Post by Steve-Matrix »

This depends on whether it is a PC Developer app or a Web Developer app.

In PC Developer, when you deploy you should click the "suggest" button on the "resources" tab of the "Deploy as Flowcode App" window. This should automatically detect and embed all images as resources within the deployed app itself. This means the ".mscada" file will contain the image and so it would not need to "live" anywhere.

In Web Developer, images cannot (currently) be embedded in the deployed app. This means that the file needs to be available for the html page to display. It's a bit more complicated and there are different situations to consider:

1) If the app is being displayed on a PC, then use an "image" component and make sure the URL in the deployed html file points to the correct location on the PC. This will initially be saved with an absolute path. You can change this to a relative path and then distribute the image with the html file.

2) If the app is being viewed on a mobile phone, then a local file will probably not be viewable (due to the browsers running in a sandbox). In this case, the best this is to use the "Image URL" component and point to another image on the web.

3) If the app is to be uploaded to a website, then either of the options above can be used.

We are working on improving image deployment in Web Developer.

Post Reply