File upload Beta

File upload Beta

$29.99
{{option.name}}: {{selected_options[option.position]}}
{{value_obj.value}}

This is our file upload beta code. Add this code to the theme.liquid file after the <head> tag. Here is more info on editing theme code. <script>function update_upload() {if ($('#bcpo input[type="file"]').length > 0) {$.each($('#bcpo input[type="file"]'), function (k, v) {$(v).css({opacity: 0, position: 'absolute', clip: 'rect(0,0,0,0)'});$('<img class="upload_photo_box" style="display:none;border: solid 1px #333;" width=200>').insertBefore(v);$('<button type="button" class="btn btn--wide upload-btn">Upload</button>').insertAfter(v);$(v).change(function () {var input = this;var url = $(this).val();var ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase();if (input.files && input.files[0]&& (ext == "gif" || ext == "png" || ext == "jpeg" || ext == "jpg")) {var reader = new FileReader();reader.onload = function (e) {$(v).siblings('img').attr('src', e.target.result).css({display: 'block', marginBottom: 5});}reader.readAsDataURL(input.

Show More Show Less