Product Generic File URL can't be accessed via liquid

Shopify Partner
1 0 1



We're having instruction manuals added to every product via a generic file metafield. The files are PDF format, and being uploaded to every product automatically.


I want to display a download button for these PDF-s on each product page, but I'm having a hard time referencing the dynamic object.


I've created the {{ product.metafields.custom.manual }} dynamic object on the page, but I'm getting a gid link back: gid://shopify/GenericFile/353XXXXXXXXXX


This can't be used to download files.


I've tried using the | file_url filter ( {{ product.metafields.custom.manual | file_url}} ), but I'm still getting a not valid URL:[%22gid://shopify/GenericFile/3639XXXXXXXXX]?162


I've also tried parsing the .value.url to the metafield like so: {{ product.metafields.custom.manual.value.url }}, but I'm only getting a blank result with this.


The file is indeed attached to said product, and the PDF can be downloaded from the file manager, so the file exists.


How am I meant to grab the actual URL of the uploaded PDF file?



EDIT: I've also tried accessing said product's information via an API call, but I only get a GID link on the API call too

"namespace" => "custom"
"key" => "guide"
"value" => "gid://shopify/GenericFile/353XXXXXXXXXX"

Reply 1 (1)

Shopify Partner
14 0 8

Did you find a solution for this? I have the same problem with email confirmations.
Im pretty sure it worked with value.url before.