Skip to content

Support additional files such as SVG symbols #23

Open
@olivierdalang

Description

@olivierdalang

Not sure if this is not yet supported or not documented or if I got something wrong.

I have layers with custom SVG symbols defined with relative paths, like this:

- base directory
  - projects
    - myproject.qgs
  - project_data
    - mydata.geojson
    - images
      - svg1.svg
      - svg2.svg
      - ...

myproject.qgs refers to datasource using ../project_data/mydata.geojson and to svgs using ../project_data/images/svg1.svg.

It works well in QGIS desktop. In G3W suite however, I could not find how to make the SVG symbols available. I thought I could just upload my svg symbols to the shared-volume/project_data with the file upload GUI, like done for datasources, but it doesn't work.

I could make them load by copying my svg symbols to shared-volume/media/project_data, but that's not doable by users through the UI.

Is there a way to achieve this ? Or could this feature be implemented ?

Worth noting that from what I understand, unfortunately the QGIS files get rewritten by g3w-admin to alter the datasource paths. A similar approach would not work for advanced use cases for SVGs (for instance data-defined path to the SVG, that can't just be searched/replaced). I think what is needed is either to be able to upload a project package instead of just a QGIS file (project package being a zipped folder of a QGIS project with arbitrary files), or to document what relative paths structures should be used for projects to be able to access files in shared-volume/media/project_data (I guess it's ../../project_data/myimage.svg)

Is the way QGIS files are rewritten documented somewhere ? Is the structure of the shared-volume directory supposed to be stable in the future (in which case we could just use ../../project_data instead of ../project_data and you could maybe skip rewriting the QGIS file).

Thanks for your inputs !

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions