How to include shape or other files in project?

In another app, tree-type, version 14.16.1 I use shape files. The app has a folder named input, at the same level as the folder app. This folder input which contains the shape files. There is no issue reading the files.

I just made a new editor app in version 14.20.0. I want to include shape files with geometries in this one too. I tried:

  • putting the files in a folder input, at the same level as app.py. It cannot be found on the published app.
  • including the folder as assets_path in the toml, but got an error that these files are of the wrong type, so the app does not publish.
  • putting the files in the main folder
    These all do not work, the files are not included in the app.

How can I include these files?

Small addition, in the development testing it all works fine.
Would it be an possible to make the development be more similar to the published version?

Hi Thomas,
Interesting case, this is indeed unexpected behavior. Could the input filder be inside the gitignore files and thus not sent along during publish? When you publish the cli lists which files are sent along.

One thing you could try is renaming the folder to e.g. shape_files and see if that works.

kind regards,
Matthijs

Thanks Matthijs!
The project does not have a gitignore file, but the shape files are not included in the git repository either.
Does the publish send only files which are in the repository?
Is there a reference to the cli publish command?

Hi Thomas,

Here you can find more info: Command-line interface (CLI) | VIKTOR Documentation

Thank you Matthijs!
I didn’t realise only files commited in git were included and I did not use the flag --use-filesystem.

1 Like