Skip to content

Commit

Permalink
Missing event on change
Browse files Browse the repository at this point in the history
Why:

* Bug that prevented preview of image

This change addresses the need by:

* Added in event var
  • Loading branch information
jasontwong committed Oct 29, 2015
1 parent a378c86 commit c429d00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/assets/javascripts/atomic_cms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c429d00

Please sign in to comment.