0

var loadFile = function(event) {
  var output = document.getElementById('output');
  output.src = URL.createObjectURL(event.target.files[0]);
  output.onload = function() {
    URL.revokeObjectURL(output.src) // free memory
  }
};
<input type="file" accept="image/*" onchange="loadFile(event)">
<img id="output" width="25%" />

Here it displays or adds only one. I want multiple images one after one.

m4n0
  • 29,823
  • 27
  • 76
  • 89
  • Please do some research before you post. This is a start https://stackoverflow.com/questions/1175347/how-can-i-select-and-upload-multiple-files-with-html-and-php-using-http-post – Allart Sep 07 '21 at 06:13
  • 1
    Does this answer your question? [How can I select and upload multiple files with HTML and PHP, using HTTP POST?](https://stackoverflow.com/questions/1175347/how-can-i-select-and-upload-multiple-files-with-html-and-php-using-http-post) – Allart Sep 07 '21 at 06:14

0 Answers0