Search
 
SCRIPT & CODE EXAMPLE
 

HTML

js download File object

<input type="file" id="uploader"/>
<script>
  // Download an image from a File() Object:
  uploader.addEventListener("change", e =>{
    const file = e.target.files[0];
    const blob = new Blob( [file], { type: file.type } );
    const elem = window.document.createElement('a');
          elem.href  = window.URL.createObjectURL(blob);
          elem.download = file.name;        
    document.body.appendChild(elem);
    elem.click();        
    document.body.removeChild(elem);
  })
</script>
Comment

PREVIOUS NEXT
Code Example
Html :: change icon title react 
Html :: links html 
Html :: faire un footer avec bootstrap 
Html :: html image as button submit 
Html :: angular add html attribute on condition 
Html :: tailwind css header 
Html :: set table column width 
Html :: gradient background css for all browsers 
Html :: how to change font color of h2 tag in html 
Html :: how to draw a small line in html 
Html :: whats app chat link for html 
Html :: Bootstrap class make your form inputs look nicer 
Html :: discord widget html code 
Html :: html to pdf angular 
Html :: where are mac notes stored 
Html :: angular open pdf in new tab 
Html :: vue transition 
Html :: character for degrees 
Html :: html form templates 
Html :: youtube autoplay 
Html :: button that links to controller html 
Html :: bootstrap checkbox 
Html :: img tag 
Html :: input type password show asterisk 
Html :: bootstrap 5 font color 
Html :: progress bar bootstrap 
Html :: multiple countdown timer js 
Html :: etiqueta tachado html 
Html :: ignor < in html 
Html :: text -center bootstrap 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =