1fetch('//my-image-url')
2 .then((e) => {
3 return e.blob()
4 })
5 .then((blob) => {
6 let b: any = blob
7 b.lastModifiedDate = new Date()
8 b.name = ''
9 return b as File
10 })
11// Promise returning a File Object
12// (usefull for previewing image in updating forms)