It looks like all the articles about searching for attachments by their extension / content type using sitesearch
are written for Confluence Server / Datacentre. There doesn’t seem to be an equivalent for Confluence Cloud yet
So, I think you have two options:
- Install Canned Search for Confluence. It’s free and if its
sitesearch~(file.extension:xyz)
function works to solve this specific problem for Confluence Cloud, then that’s great. - If not, just search for all the attachments, in batches, then filter the resulting JSON responses to isolate the particular ones that have the extensions at the end of the
title
field.
Personally, I’d also raise a Confluence Cloud feature request, as it’s a bit silly that the JSON object title
contains the file extension, but you can’t find it via the contains operator in a CQL search.