How to build a PDF downloader on the Product Page
Learn how to build a PDF downloader on the Product Page. This way you can upload different files for different products and they’ll dynamically show up on each PDP! Here’s the final code snippet:
{% if product.metafields.custom.pdf_upload %}
<div class="pdf">
<a href="{{ product.metafields.custom.pdf_upload | file_url }}">Product specs</a>
</div>
{% endif %}