javascript remote file to blob code example
Example: create file object from url typescript
fetch('//my-image-url')
.then((e) => {
return e.blob()
})
.then((blob) => {
let b: any = blob
b.lastModifiedDate = new Date()
b.name = ''
return b as File
})
// Promise returning a File Object
// (usefull for previewing image in updating forms)