Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

base64 to blob

const byteCharacters = atob(b64);
const byteNumbers = new Array(byteCharacters.length);
for (let i = 0; i < byteCharacters.length; i++) {
  byteNumbers[i] = byteCharacters.charCodeAt(i);
}
const byteArray = new Uint8Array(byteNumbers);
const blob = new Blob([byteArray], {type: 'audio/mp3'});
Comment

PREVIOUS NEXT
Code Example
Javascript :: simple javascript function 
Javascript :: math .round 
Javascript :: resize function in addEventListener JS 
Javascript :: duplicate numbers in an array javascript 
Javascript :: javascript if string empty 
Javascript :: react download file from express res.download 
Javascript :: settimeout function es6 
Javascript :: express param in url 
Javascript :: js null is object typeof 
Javascript :: what is interpolatin in javascript 
Javascript :: reload data in datatable 
Javascript :: js regex replace multiple matches 
Javascript :: updating a key value on javascript object es6 
Javascript :: image upload react 
Javascript :: adding js file to reactjs 
Javascript :: get value for radio button in jquery label 
Javascript :: how to import js via script in react 
Javascript :: nepali date picker 
Javascript :: react pass props to child 
Javascript :: javascript random number up to including 2 
Javascript :: javascript count number of occurrences in array of objects 
Javascript :: jquery convert time to 1day 2 minutes 4 seconds 
Javascript :: tribonacci sequence javascript 
Javascript :: js key value array 
Javascript :: mongoose multiple populate 
Javascript :: javascript get last object in foreach loop 
Javascript :: express-async-errors 
Javascript :: react scroll to bottom 
Javascript :: normalize javascript 
Javascript :: how to get key from value in javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =