1Back up your theme (Online Store > Themes > Actions > Duplicate) before changing any code.
2Open Online Store > Themes > Edit code and create a new file under Snippets named file-upload.liquid.
3Paste the complete file - markup, styles and JavaScript are already inside the single file, nothing else to install.
4Call the snippet from the template or section where it should appear using the render tag shown in the Usage tab.
5Preview the product, collection or cart page and test on mobile before publishing.
6Render inside the product form - file uploads as a property link on the order.
7Requires the form to have enctype multipart - most themes do by default.
file-upload.liquid
1<divclass="gpl-upload">2<labelclass="gpl-upload__label"for="gpl-upload-field">{{label| default: 'Upload your file'}}</label>3<inputid="gpl-upload-field"class="gpl-upload__input"type="file"name="properties[{{ label | default: 'Upload' }}]"accept="image/*" required>4<pclass="gpl-upload__hint">JPG/PNG, max 20MB - we print exactly what you upload.</p>5</div>