From c429d0066a58401cfe7a85f57e3cf9b250d6f423 Mon Sep 17 00:00:00 2001 From: "Jason T. Wong" Date: Thu, 29 Oct 2015 13:39:18 -0400 Subject: [PATCH] Missing event on change Why: * Bug that prevented preview of image This change addresses the need by: * Added in event var --- app/assets/javascripts/atomic_cms.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/atomic_cms.js b/app/assets/javascripts/atomic_cms.js index 5b55b7a..dae8dff 100644 --- a/app/assets/javascripts/atomic_cms.js +++ b/app/assets/javascripts/atomic_cms.js @@ -142,9 +142,10 @@ var $input = $(this); var $next = $($input.siblings('input')); $input.attr('name', null).val(''); + console.log('testing event attach'); - $input.on('change', function() { - + $input.on('change', function(event) { + console.log('testing file change'); var formData = new FormData(), fileData = event.target.files[0]; formData.append('file', fileData);