Synchronizing Images from NativeMobile

0
Hi,   I am writing a nanoflow for a native mobile app on Mendix, and am trying to get images to the server’s database. And the flow is what is shown below. I retrieve a list of ‘images’ (this entity Failure_Image inherits from System.Image) I create a loop to “Log Message”, looping through the list from step (1) to see if the Failure_Image objects exist on the client Then I synchronize the ‘Failure Image’ list.   Thereafter, I can see that my console present the log messages from the loop above: Which means there exists objects in the ‘Failure Image’ list.   After this flow executes, I check on system$filedocument through an SQL query: SELECT id, fileid, size, createddate, submetaobjectname FROM system$filedocument ORDER BY createddate DESC And noticed, instead of the ‘Failure_Image’ objects in the first 2 records, I see objects created for System.SynchronizationErrorFile, as shown here:   *** Edit *** Just to add on, upon inspecting System$SynchronizationError: The reason was “unable to find file object”, and the file-name within ‘ObjectContent’ of System$SynchronizationError matches that of the console log message.   Tried 2 methods of uploading the image, using “TakePicture” javascript action from NativeMobileResources (Marketplace module), either from Picture source (image below): camera or imageLibrary (take a photo using the phone’s camera app, then uploading it within the Mendix Native App)   It appears something went wrong in an attempt to synchronize the image files. Wondering if anyone might have experienced this before, and have advice on how to proceed on debugging this issue? Thank you.
asked
1 answers
0

Hi Terry,

Did you commit the images?

 

“ If the set of objects selected for synchronization contains any objects that have not been committed yet, those objects will be skipped and thus not synchronized “ in the docs: https://docs.mendix.com/refguide9/synchronize/

answered