Hi, I inserted this simple code on a product page but the button is always displayed even when the file isn’t there. Where am I wrong?
{% if product.metafields.custom.scheda_prodotto.file_url != "" %}
<a class="badge price__badge-sale color-accent-2" href="{{ product.metafields.custom.scheda_prodotto | file_url}}" target="_blank">SCHEDA PRODOTTO</a>
{% endif %}
The button is always displayed and when the file is there it works correctly but if the file is not present I get a 404 error