paperclip - Image replacing using upload preview in rails -
I am using paperclip in my project. The image is being shown as editing, but I want to change that uploaded image instead of the new image. Try this script: function readURL (input) {If (input.files and input.files [0]) {var reader = new FileReader (); Reader.onload = function (e) {$ ('# my_image') .attr ('src', e.target.result). With (100) .high (100); }; reader.readAsDataURL (input.files [0]); }}