Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Convert base64 string into File type

const url = 'data:image/png;base6....';
fetch(url)
  .then(res => res.blob())
  .then(blob => {
    const file = new File([blob], "File name",{ type: "image/png" })
  })
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #Convert #string #File #type
ADD COMMENT
Topic
Name
2+6 =