Attachments not synchronized on mobile device

Hi there,

I have developed an input mask for QField mobile device, where the field team can view locally stored JPGs through the attachment widget. I am able to upload them to QFieldCloud, but I cannot view/access them on my mobile device running QField Dev.

It works with regular QField.

I tried to find the locally stored QFieldCloud Project and move the JPG files in the local folder, but cannot find one. Mind that these JPGs are not intended to be edited or synchronized, I just need them copied once to the mobile device and be able to access them from the QField widget.
Also, when taking a picture in the field with the mobile device, synchronization works beautifully!

Any help?

Here is a snippet from the data list from this project, taken from a web browser. The JPGs were clearly uploaded:


Imported from GitHub discussion by @alpinfra on 2021-11-12T06:47:35Z

In order to provide a clearer and more manageable discussion forum and to have all discussions about QField and related products (i.e. QFieldCloud and QFieldSync) in a single place, we transferred all the discussions from the QFieldCloud to the QField repository.


Imported from GitHub comment by @marioba on 2022-02-01T13:26:25Z

alpinfra Hey, sorry for the delayed answer. Can you test with the latest beta and/or nighly builds? There was a small issue regarding photo syncrhonization that was fixed recently.

Also, please make sure the attachment form fields are configured to use “relative path” on QGIS.


Imported from GitHub comment by @suricactus on 2022-03-09T07:31:00Z

alpinfra sorry I was not clear, I meant QField beta/dev version.

Please install the latest QField from here sos-ch-dk-2.exo.io/qfieldapks/ci-builds/qfield-dev-master-70e3769da009796c632badc35f2949d4717de23a-arm64-android.apk


Imported from GitHub comment by @suricactus on 2022-03-09T08:39:36Z

Will give it a try. However, I deleted the original project from the cloud before trying creating it again from scratch with the latest QFieldSync plugin. Need to figure out how to get it up on the cloud again :wink:


Imported from GitHub comment by @alpinfra on 2022-03-09T08:42:48Z

Ah, I see why you posted the QFieldSync issue. :slight_smile: Let’s see if we can get it sorted QFieldSync 4.0.0 BETA20 crashes when uploading to cloud · Issue #404 · opengisch/qfieldsync · GitHub fast enough.


Imported from GitHub comment by @suricactus on 2022-03-09T08:51:02Z

I was able to upload the project from an earlier stage to QFieldCloud.
Installed QField on my mobile device (Samsung tablet) from your APK. Checked version, it says “master-dev”, updated on 2022-03-07.

On mobile device, when trying to download the project, I get an error:
Downloading error. Packaging job finished unsuccessfully for XX. Job (XX) finished with a failed status.

When I open QFieldCloud in a web browser, project is listed with status OK.


Imported from GitHub comment by @alpinfra on 2022-03-09T09:36:10Z

Thanks, will have a look.


Imported from GitHub comment by @suricactus on 2022-03-09T09:42:10Z

The crash is due to mbtiles, as you jave noted. Back to your photos: there is a limitation that you need to store all your photos in a directory named DCIM , while your files are stored in a directory named JPG . When you rename the directory don’t forget to update your data in the attribute table of the photos layer too.


Imported from GitHub comment by @suricactus on 2022-03-09T11:34:26Z

Am i able to use subdirectories within DCIM? Would that work?


Imported from GitHub comment by @alpinfra on 2022-03-09T11:47:54Z

yes, subdirs within DCIM are fine.


Imported from GitHub comment by @suricactus on 2022-03-09T12:09:23Z

YESSS! I can confirm it works :+1: moved the /JPG folder into /DCIM/JPG and I am now able to view the attachments :slight_smile:


Imported from GitHub comment by @alpinfra on 2022-03-09T13:25:18Z

Wohoo! :balloon: Happy QFieldClouding!


Imported from GitHub comment by @suricactus on 2022-03-09T13:46:21Z

There is a limitation that you need to store all your photos in a directory named DCIM, while the files in your project are stored in a directory named JPG. You can have multiple subdirectories in the DCIM directory. When you rename the directory don’t forget to update your data in the attribute table of the photos layer too.


Imported from GitHub comment by @suricactus on 2022-03-09T13:46:24Z