Displaying 1 result from an estimated 1 matches for "revokeobjecturl".
2012 Sep 25
1
Show thumbnail preview of image before upload
...es) {
    var img = document.getElementById("image-preview");
    if (!files.length) {
      img.src = "/img/default-profile-image.png";
    } else {
      img.src = window.URL.createObjectURL(files[0]);
      img.height = 60;
      img.onload = function(e) {
        window.URL.revokeObjectURL(this.src);
      }
    }
  }
but I want to keep the thumbnail image in the case of validation fails.
Please help me....
Thanks in advance,
Avantec
-- 
Posted via http://www.ruby-forum.com/.
-- 
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk...