mobile icon indicating copy to clipboard operation
mobile copied to clipboard

Issue with storing photos to custom folder

Open RastoHu opened this issue 6 months ago • 3 comments

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

  1. 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')"
  2. set custom folder where the photos will be stored - follow exactly the documentation
  3. sync
  4. In the app sync, record point and take photo for this point
  5. 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.

RastoHu avatar Jun 19 '25 15:06 RastoHu

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

ValentinBuira avatar Jun 20 '25 09:06 ValentinBuira

Related (or maybe duplicate) to https://github.com/MerginMaps/mobile/issues/2975

tomasMizera avatar Jun 20 '25 10:06 tomasMizera

Some work has started on branch: https://github.com/MerginMaps/mobile/tree/fix-photo-naming

tomasMizera avatar Jun 26 '25 13:06 tomasMizera