base64 to blob
import { base64StringToBlob } from 'blob-util';
const contentType = 'image/png';
const b64Data = 'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==';
const blob = base64StringToBlob(b64Data, contentType);
// Do whatever you need with your 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'});
Also in JavaScript:
- jquery validation plugin google recaptcha
- javascript get all options from select
- registeing components in vue
- javascript check if file exists on server
- how to shallow clone javascript class
- add 10px to width js
- pdf javascript search text
- loopback model find by id
- jquery ready function
- How to replace an array vue.js
- ngfor index
- rows().remove
- Accessing Object Properties with Variables
- express get cookie
- react native android padding style
- javascript sort function
- how do i check if JQuery checkbox is checked
- python dictionary to json
- clear formarray in angular 6
- casting in javascript
- square brackets vs curly brackets javascript
- use effect like component did mount
- js insert in array
- react native background image