Positioning functions such as @gnss_orientation do not work as expected within the attachment naming expression.
Reproduction steps
Steps to reproduce the behavior:
Setup a geometry layer in QGIS with a field for attachments.
In the Qfield tab of the layer properties, use 'DCIM/layer_' || @gnss_orientation || '.{extension}' or a similar expression as the attachment naming scheme.
Open the project in Qfield and use the camera widget to snap a photo
View the file name of the photo.
Expected behavior
The file should have a name such as layer_25.416004835.jpg
Observed behavior
The image name reverts to the default naming scheme, indicating an error or null value in the expression.
Desktop (please complete the following information)
OS: Windows
QGIS Version 3.38.0
QFieldSync Version 4.9.1
Mobile (please complete the following information)
Device: Samsung Galaxy A13
OS: Android 14
QField version: 3.3.6 (78a4fe)
Additional information
Storing the device's orientation at the moment the photo is taken is useful for a variety of applications. Extracting exif data from photos taken with the Open Camera app used to be the way to do this, but the app is apparently unable to interact with Qfield as of Android 11. Qfield's built-in camera and many native cameras also do not appear to store this exif data. Merely creating a field with @gnss_orientation as the default value would store the device orientation when the feature was added, not when the photo was taken. An alternative solution would be to add the exif data to Qfield's built-in camera widget.
@cruelaid , transformed that into an enhancement request, it is indeed the case that the attachment file naming does not yet support positioning (and qfieldcloud) scopes.
Describe the issue
Positioning functions such as @gnss_orientation do not work as expected within the attachment naming expression.
Reproduction steps
Steps to reproduce the behavior:
Expected behavior
The file should have a name such as layer_25.416004835.jpg
Observed behavior
The image name reverts to the default naming scheme, indicating an error or null value in the expression.
Desktop (please complete the following information)
Mobile (please complete the following information)
Additional information
Storing the device's orientation at the moment the photo is taken is useful for a variety of applications. Extracting exif data from photos taken with the Open Camera app used to be the way to do this, but the app is apparently unable to interact with Qfield as of Android 11. Qfield's built-in camera and many native cameras also do not appear to store this exif data. Merely creating a field with @gnss_orientation as the default value would store the device orientation when the feature was added, not when the photo was taken. An alternative solution would be to add the exif data to Qfield's built-in camera widget.