In the last tutorial, we created a form that allows users to report their symptoms. We added an image uploader to this template, but we have yet to make it functional. Let’s get to work!
Storing the images using actions
As explained in Part II of the RestoRate series, actions executed within a certain template will always receive parameters passed to that template. Actions executed by a certain trigger can also receive certain parameters. The on upload trigger always passes the “MEDIA_ID” to the action that is being executed by the trigger.
The difference with our medical application is that the symptoms form data item has not been created yet when the images are uploaded, because the submit button is pressed after the uploading. Since we cannot add images to data that doesn’t yet exist, we must figure out a different approach.
Our approach in broad terms is as follows:
In the next tutorial, we will display the symptoms information for every patient to their doctor.