Issue with storing photos to custom folder
Description If a custom name is set for taken photos and custom folder is set for storing photos, the photos are not stored to custom folder, but to the project folder instead.
Environment Staging
Application (+ app version, build, operating system) QGIS version: 3.40.5-Bratislava Plugin version: 2025.2 OS: macOS, Sequoia 15.5
Steps to reproduce
- in QGIS plugin set custom name for photos. Project - Properties - Mergin Maps - Photo attachments configuration - click on point layer - insert "@mergin_username + '-' + format_date(now(),'yyMMddhhmmss')"
- set custom folder where the photos will be stored - follow exactly the documentation
- sync
- In the app sync, record point and take photo for this point
- In QGIS sync and check results
Actual results Photo should be stored to custom folder, but is stored to project folder instead. User must overwrite expression for photo naming to "'[folder_name]/' + @mergin_username + '-' + format_date(now(),'yyMMddhhmmss')" to get expected results.
Expected results Photo is stored to defined custom folder. Fix the plugin or update documentation for custom photo names section.
I can confirm, it seems the expression name is treated as a path for example if the expression is date format_date( now(), 'dd/MM') + @mergin_username a new folder with the day (dd) will be created from the app and the name of the photo will be the rest of the expressions. but not stored in the good photos folder anyways
I transfer the issue to mobile
Related (or maybe duplicate) to https://github.com/MerginMaps/mobile/issues/2975
Some work has started on branch: https://github.com/MerginMaps/mobile/tree/fix-photo-naming