Shopify Upload Button - Compulsory


I’m curious to know whats the best method to add a condition so a customer cannot “Add to cart”, “buy with paypal” or any another check out method without adding an image?

Hi @Dihan_A,

Welcome to Uploadcare Community!

You can use the JS API of the widget to track the moment when a file has been uploaded. The onUploadComplete method provides you with the ability to do something after a file is uploaded and ready.

You need to disable the buttons by default and enable them inside the onUploadComplete callback (once a user has uploaded a file). Check out this sandbox to see the script in action

1 Like

Perfect. Exactly what I needed.

Thanks Alex

1 Like