Skip to content

Bug: Photo folder path not resolved correctly on Windows when using forward slashes in @project_home expression #4380

@GvdDool

Description

@GvdDool

In my current project, I have to store images in four different tables, in four different folders, and while following the documentation:
https://merginmaps.com/docs/layer/photos/#how-to-set-up-a-custom-folder-for-storing-photos
I noticed that the camera was not able to locate the folder I created and pointed to by using the following expression:
@project_home + '/photos/thema01/'
But when changing to:
@project_home + \\photos\\thema01\\
the camera finds the folder and saves the image.

Platform: Windows 10/11, QGIS desktop project synced to Mergin Maps mobile.

PHOTO_FILE stored value: When using backslashes, the file is written to the table as filename only (e.g. JPEG_20260309_....jpg), the application correctly resolves the file and shows the correct gallery based on the active theme.

Expected behaviour: The documentation examples use forward slashes but do not mention Windows path separator behaviour. Either the expression should be normalised automatically regardless of OS, or the documentation should explicitly note that Windows requires backslashes in the @project_home path expression.

Metadata

Metadata

Labels

support questionto be handled by the support team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions