title: how to show thumbnails of dropped images before submit
body: <pre><code>&lt;div class="top-main-section"&gt;
    &lt;%= form_for @usr_vendor_web_slide ,url:{action: "slidecreate"} , html: {class: "form-horizontal"} do |f| %&gt;
      &lt;div class="top-main-section-area"&gt;
        &lt;div id="upload-area" class="uploader1" onclick="$('#post_image').click()"&gt;
          &lt;%= f.file_field :images, :onchange =&gt; 'readURL(this)', class:'slide-img', multiple: true, id:'slide-img'%&gt;
            &lt;img id="slide_image" src="#" alt="image" style="display: none;" class="slide_image" /&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;%= f.submit({:class =&gt; 'btn btn-primary'}) %&gt;
    &lt;% end %&gt;
  &lt;/div&gt;
  
  &lt;div id="thumbnail" class="thumbnail"&gt;
    &lt;img id="slide_image1" src="#" alt="" style="" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>javascript file</p>
  
  <pre><code>var data = [];
  
  function readURL(input) {
      if (input.files &amp;&amp; input.files[0]) {
          var reader = new FileReader();
          var ids = $("#slide_image");
          insert();
  
          function insert() {
              var id;
              id = ids;
              data.push({
                  id: id,
              });
              clearAndShow()
          }
  
          function clearAndShow() {
              // Clear our fields
              ids = "";
              console.log(data)
          }
          reader.onload = function(e) {
              $("#slide_image").style.display = 'block';
              $('#slide_image').attr('src', e.target.result).width(1000).height(480);
              $("#slide_image").style.display = 'block';
              $('#slide_image1').attr('src', e.target.result).width(100).height(100);
          };
          reader.readAsDataURL(input.files[0]);
      }
  }
  </code></pre>
  
  <p>I'm try to show images thumbnails before submit . I'll success in current dropped image show in top main section area and show it's thumbnail in thumbnail part. but i want to show all thumbnails in thumbnail part before submit. I'll try to make a javascript array and store images in that array. but i cannot get image src to show in thumbnail part. appreciate your ideas</p>