Fixed thumbnail problem with multiple files

This commit is contained in:
Marcin Kurczewski 2013-10-07 10:56:19 +02:00
parent 3fd34db37c
commit 4aa41653be

View file

@ -114,12 +114,12 @@ $(function()
continue;
}
var img = postDom.find('img')
var reader = new FileReader();
reader.onload = (function(theFile)
reader.onload = (function(theFile, img)
{
return function(e)
{
var img = postDom.find('img')
/*img.css('max-width', img.css('width'));
img.css('max-height', img.css('height'));
img.css('width', 'auto');
@ -127,7 +127,7 @@ $(function()
img.css('background-image', 'none');
img.attr('src', e.target.result);
};
})(file);
})(file, img);
reader.readAsDataURL(file);
}
$('#upload-step2').fadeIn(function()