How to Retrieve the Source of a File Type in a GROQ Query

4 replies
Last updated: Aug 5, 2022
is there a way to retrieve the source of a
file
type in a groq query? (an svg uploaded via file type for example)
Aug 5, 2022, 4:43 PM
You can resolve the asset reference with
->
.
Aug 5, 2022, 4:44 PM
by source, I mean the raw contents of the file itself; so in this case, the actual inline svg inside the file. I didn't see it under
->
, unless I'm missing something?
Aug 5, 2022, 4:47 PM
Ooooh I see. No you won’t be able to have that out of the box.
Aug 5, 2022, 4:48 PM
alright, thank you for the quick answers 👍
Aug 5, 2022, 4:50 PM

Sanity.io – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Categorized in