const url = 'data:image/png;base6....'; fetch(url) .then(res => res.blob()) .then(blob => { const file = new File([blob], "File name",{ type: "image/png" }) })