Hi Sheena,
It appears that Passthrough is enabled on the form, which will prevent us from being able to retrieve the images after the form has been processed. You can find more details about Passthrough here:
https://docs.truecontext.com/1374411/Content/ProntoFormsSecurityandCompliance/217499888DataPassthrough.html?Highlight=passthrough
If Passthrough is required, I recommend configuring a data destination to store the images/attachments outside of the TrueContext platform (e.g., SharePoint, Amazon S3, FTP server, or a webserver via the HTTP Data destination), from which you can later retrieve them.
Cheers,
------------------------------
Scott Daly
Senior Manager, Implementation Services
TrueContext
------------------------------
Original Message:
Sent: 09-16-2024 18:08
From: Sheena Yadav
Subject: Get Images from an "Image" Type From Question from a Submitted Form Submission
Hi Scott,
Thank you for your response. I am working with Tanner on the same project and I tried setting up the api above to retrieve image data. I am running into the following 404 error though:
Your API call resulted in an error. Please see the HTTP Headers for details. Error message: Passthrough Data Not Saved: Passthrough data is not saved, and cannot be retrieved.
Any ideas why this might be? I've tried a couple identifiers now and I get the same error.
------------------------------
Sheena Yadav
Software Developer
Punchcard
Original Message:
Sent: 09-09-2024 09:29
From: Scott Daly
Subject: Get Images from an "Image" Type From Question from a Submitted Form Submission
Hi Tanner,
We do have a REST API endpoint available which would allow you to fetch a specific image/attachment from a form submission.
Retrieve a Form Submission attachment
Using the example json you shared above, the request would be something like (replacing dataId with your specific form submission ID, which will look something like 18379191234):
https://api.prontoforms.com/api/1.1/data/{dataId}/attachments/31eef693-174e-41f8-9836-0c9310c6f43f
Alternatively, you can configure an additional HTTP FileUpload Data Destination on the form to have the photos sent to your webserver or location of your choosing at the time the form submission is processed. You can configure the naming convention used so that you can easily find/reference it later.
Hope this helps!
------------------------------
Scott Daly
Senior Manager, Implementation Services
TrueContext
Original Message:
Sent: 09-07-2024 22:29
From: Tanner Punch
Subject: Get Images from an "Image" Type From Question from a Submitted Form Submission
Hello, to understand my question first let me tell you about the workflow I am trying to implement.
Custom Form has "Image" Question Type which allows a user to take a photo using their issued phone or they may upload a photo from their device
Custom Form is saved and sent to an external API as a data destination.
External API then saves the data inside of an offsite database.
The data saved in the database is easily parseable and what I am attempting to do, is retrieve any images uploaded by a user and then render them on a 3rd party web application that I have created.
As an example here sample data from a form submission that has been parsed by our system - using the "identifier" property is there an API endpoint that I can query to download the file, or better yet, is there a URL which i can retrieve the file from using the "filename" property
"question": "Back of Stat Serial No.", "values": [ { "identifier": "31eef693-174e-41f8-9836-0c9310c6f43f", "filename": "BackStatSerialNo_1.jpeg", "contentType": "image/jpeg", "imageMetadata": { "orientation": "Portrait", "width": 480, "height": 640 } } ],
------------------------------
Tanner Punch
Software Developer
Punchcard
------------------------------