Upload file through schema

Avinash
Tourist
9 0 4

Hai,

we use a setting of type image_picker to upload images such as logo images etc in our theme.

we can access that logo through its id : <img src="{{ settings.logo | img_url: 'master' }}"> in our theme

example schema:

{   "name": "Logo",   "settings": [     {       "type": "image_picker",       "id": "logo",       "label": "Logo image"     }   ] }

 In the same way is there any schema settings to upload Documents like .pdf, .xlsx etc.

so that we can access that document through the id given to that schema in our theme.

zaheer_abbas786
New Member
2 0 0

Hello,

You may use 'url' type instead of 'image_picker' and then you can paste url of your uploaded file in theme settings under "File" section.

This is the link to all types available for {% schema %}.

https://shopify.dev/docs/themes/settings

Hope it helps

0 Likes