Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

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
7+6 =