Creating Blobs and Blob URIs

You may also like...

2 Responses

  1. Kate says:

    Hi Dan, URL.createObjectURL is deprecated now, which is why this line
    var blobUrl = URL.createObjectURL(blob);
    isn’t working anymore. Do you have an idea how to solve this?

    • Dan says:

      Hi Kate, which browser are you using? I just tried it on Chrome 74 and Firefox 66 and it worked. You are right though that the API is deprecated. I’ll see what I can figure out. Thanks for pointing that out!

      Edit: I checked the API docs again and it looks like the URL.createObjectURL(stream) API has been deprecated. The URL.createObjectURL(blob) API still remains and so this code should work. See: https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.