Blobs and Blob URLs | JavaScript Tutorial

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • 👉 Blog post: openjavascript...
    ⚡ Need hosting for a website, WordPress blog or Node.js app? We use HostWithLove: bit.ly/3V2RM9Q ❤️
    This tutorial shows you how to create Blob objects using the Blob constructor, from user input or an external URL and create a Blob URL from the resulting blob data using URL.createObjectURL().
    A Blob URL functions like a normal URL on a HTML page without the need for a server.
    Use case examples featured in the video include how to start a client-side download from data held in a blob object, preview a user-uploaded image and generated a URL to an image edited with the HTML Canvas API.
    #blob #blobs #url #createObjectURL #revokeObjectURL #javascript #javascript_tutorial

Комментарии • 31

  • @OpenJavaScript
    @OpenJavaScript  Год назад

    Thanks for watching!
    👉 More about blobs: openjavascript.info/2022/10/17/what-is-a-blob-object-in-javascript/

  • @blutube9916
    @blutube9916 8 месяцев назад +2

    Thanks for the video, helps me to understand blobs and using them. With drily written tutorials I sometimes find it hard to absorb the same info.
    I am learning about this, to store images in IndexDB. And to be able to get them and show them again to the user where they can download them if the need to.

  • @konstantinkonorev5225
    @konstantinkonorev5225 4 месяца назад

    Thanks a lot mate for a good explanation. That's time to add it to my playlist not to forget about those people who help everybody to be better. My OG!

  • @kuoyulu6714
    @kuoyulu6714 6 месяцев назад +1

    Thanks alot, this tutorial is great, and easy to understand!

  • @sodiqayilara1519
    @sodiqayilara1519 11 месяцев назад

    Nice, wrote some code using blobs recently, didn't understand what I was doing, but now I get it. Thanks.

  • @Pagegift
    @Pagegift Год назад +1

    You are a very cool guy!
    Thank you for the lesson!
    Now I know how to get images

  • @vellenger
    @vellenger Год назад +1

    Buen Tutorial, lo aplicare de seguro en algún momento, me sera de utilidad. Gracias

    • @OpenJavaScript
      @OpenJavaScript  Год назад

      De nada!
      Es sorprendente que útil este metodo es para trabajar con ficheros en JS.

  • @HarshSingh-hk8fe
    @HarshSingh-hk8fe 9 месяцев назад

    what an incredible tutorial learnt alot. relly thankyou sir for this tutorial

  • @PracticalMindset
    @PracticalMindset 10 дней назад

    As a indian 🇮🇳 student : Understanding your English is hard then javascript .
    😅😅

  • @kaustavroy6542
    @kaustavroy6542 6 месяцев назад

    This was fantastic 😍 thanks.

  • @sherifezzat4983
    @sherifezzat4983 Год назад +1

    Great thanks for sharing ❤️
    Can you please put these JavaScript Tutorials into a playlist and number them? That would be easy to follow! Thanks again 😊

    • @OpenJavaScript
      @OpenJavaScript  Год назад +1

      Great idea!
      The number of videos is growing now so I'll review them and order them thematically into playlists (also in the right order where appropriate)

    • @sherifezzat4983
      @sherifezzat4983 Год назад

      Thanks so much ❤️

  • @user-cm9ik9sn4l
    @user-cm9ik9sn4l Год назад +1

    Bro *how to access an image file from my Google drive and convert it to Blob object?*

  • @johnwayne8059
    @johnwayne8059 4 месяца назад

    Great videos!👍👍👍

  • @Ronald__75g
    @Ronald__75g Месяц назад

    Don't miss the exclusive interview with Binance's CEO for a glimpse into the future

  • @jemrl
    @jemrl 7 месяцев назад

    Thanks, do you have a working example of video/mp4 blobs? Do you use MediaSource? Thanks

  • @aryanandakumar7936
    @aryanandakumar7936 8 месяцев назад

    Great tutorial. What to do if I have different types of files and want to generate blobs and blob urls?

  • @reefgb77
    @reefgb77 Год назад

    Great tutorial video

  • @ROSHANKUMAR-rl6bf
    @ROSHANKUMAR-rl6bf 10 месяцев назад

    hi can u make a video on how to show progressbar using fetch , i have been looking for it all over the places couldnot find any,

  • @cloudsystem3740
    @cloudsystem3740 Год назад

    thank you very much 🙏

  • @ajaygulani3086
    @ajaygulani3086 Год назад

    What a great video!! One question: If someone were to look at the source they would see the original URL that is being fetched, how do you hide this?

    • @sodiqayilara1519
      @sodiqayilara1519 11 месяцев назад

      It's quite hard to hide any code that is shipped to the client. If you want to hide it, run the logic on the server and hide your secret in environmental variables.

  • @rpseries1473
    @rpseries1473 Год назад +1

    Bro how can hide or change url or stream url to change in blob url

    • @OpenJavaScript
      @OpenJavaScript  Год назад

      A blob URL is created from blob/file data held in memory in JavaScript.
      So to create a blob URL from a regular one you would need to get whatever resource is at the original URL in blob format and then create a blob URL from it.
      This tutorial shows you how to read a URL resource to a blob: ruclips.net/video/cP5E0b21f_Y/видео.html
      With the resulting blob, you can create a blob URL with the following code:
      const blobURL = URL.createObjectURL(blob);

  • @psyferinc.3573
    @psyferinc.3573 6 месяцев назад

    sanks