Currently, you can use calculations (Pro and Agency) to accomplish this.
When an upload question (image, file) is piped into a calculation, it is represented as the path to the file, separated by newlines, \n
.
To count them, then, we could use a calculation like
if({{ uploaded_key }}, count(split({{ upload_key }}, "\n"), 0);
where upload_key
is the upload question’s pre-fill key (can be found at the bottom of that question’s configuration).
First, we make sure the question is answered. This isn’t always a required step for calculations, but the answer is 1 before we even answer the question due to how our count()
works. Checking if it’s answered first and providing 0 if it doesn’t alleviates this issue while still giving us the proper count when we need it.
Then, it grabs the answer from the upload question, shoves it into a list using \n
as the delimiter, and then counts the number of items in the list. This, then, is equal to the number of files uploaded.
You can then use this calculation’s answer for your integration.