Loading SVGs in Xojo Web Application

Hi!

I am new to Xojo Web, hence my basic question.

I am trying to build a class that reads SVG files from a folder and stores them in the Web application for use in my Webapp’s various buttons/controls.

The SVGs has to be uploaded manually once by me while developing and has to stay there. The user can’t be able to upload, download or delete any of these files. I am following this article as a reference: Using SVG in Xojo Web

In this article, Jeannot uses the “ressources” folder to proceed. However, I can’t seem to be able to upload my files to this folder or to read them in my Webapp at startup.

How does the “ressources” folder function in a Webapp?

Thanks!

Simon

Welcome to the forum, @Simon_Frechette

In order to copy files and folders to the resources folder, you can add a Copy Files “Build Step”.

Then set the “Resources Folder” as the destination.

Drop the files and folders and the files will be available using SpecialFolder.Resources and SpecialFolder.Resource.

You will need to add the Copy Files step on each target OS you plan to deploy your web application server.

Make sure to check the Build Automation section.

3 Likes

Makes much sense now!

Thanks for the detailed answer.

1 Like