b64-to-file
v1.0.4
Published
convert file base64 string to object File
Downloads
227
Maintainers
Readme
BASE64 STRING TO OBJECT FILE
Convert Base64 string to Object File
example use :
import b64ToFile from 'b64-to-file'
const myBase64 = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAgE....'
const fileName = 'myFiles'
const convertedFile = b64ToFile(myBase64, fileName)
convertedFile output :
File {
name: 'myFile',
size: 1000203, // (example)
mime: 'png', // (example)
...
}
like you got files from input-file html elements