Skip to content

Instantly share code, notes, and snippets.

@tobymarsden
Created June 10, 2019 17:14
Show Gist options
  • Save tobymarsden/4430feb89d736d2ab7502f6117bc7077 to your computer and use it in GitHub Desktop.
Save tobymarsden/4430feb89d736d2ab7502f6117bc7077 to your computer and use it in GitHub Desktop.
<script>
window.UploadKit = window.UploadKit || {}
window.UploadKit.callbacks = {
afterRefresh: function(data) {
if(window.UploadKit.product && window.UploadKit.product.tags && window.UploadKit.product.tags.indexOf('multi-frame') > -1) { return }
if(data.files && data.files.length > 0) {
$('input[name=quantity]').val(data.files.length)
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment