Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

Convert file to Base64

handleUpload(event) {
    const file = event.target.files[0];
    const reader = new FileReader();
    reader.readAsDataURL(file);
    reader.onload = () => {
        console.log(reader.result);
    };
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Convert #file
ADD COMMENT
Topic
Name
7+3 =