Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

angular 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: #angular #convert #file
ADD COMMENT
Topic
Name
8+7 =