0

I have a html string that contains a image tag. I want to get that image and convert to blob and then a file.Is it possible?

html string is sth like this:

  <p><img class="logo" src="assets/alphaRoute/LogoOnly-01.svg" alt=""></p>
maral
  • 259
  • 4
  • 18
  • So you need to parse the HTML, find the element, read the attribute value, convert it to a blob, and then convert it to a "file" (whatever that means in the context of angular). Which **specific** part of that is is causing you trouble? – Quentin Jul 19 '22 at 08:29
  • converting to blob @Quentin – maral Jul 19 '22 at 08:36
  • Then you should rewrite your question to focus on that. – Quentin Jul 19 '22 at 08:36
  • 2
    Also you could try searching since it took me all of 10 seconds to find [this](https://stackoverflow.com/questions/12168909/blob-from-dataurl) duplicate. – Quentin Jul 19 '22 at 08:39
  • @Quentin I edited the question.I pasted wrong html string.I have just the image local source address. – maral Jul 19 '22 at 10:26

0 Answers0