Create File URLs in JavaScript: Data URLs v Blob URLs

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024

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

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

    I really like your content. Don't often see other tech youtubers making these obscure web api tutorials like you. Subscribed!

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

      Thanks, glad you are liking the content. And really appreciate the sub!
      I did sub you back. You mention that you are a tech youtuber...are you posting any videos soon? I'll watch out in case.

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

      @@OpenJavaScript oh I am not a tech RUclipsr (by other tech youtubers I meant other tech youtubers I subscribe to), just a lurker feel free to unsubscribe as I never post videos haha.

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

      @@hideinbush0 Ah, I see 😂 I will keep the sub but limit my expectations then.

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

      @@OpenJavaScript haha great, btw do you have a Twitter? Lots of tech devs I subscribe to have a Twitter account I regularly follow so I can keep up with latest trends, maybe having one could be helpful to get you more views 🤔

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

    Finally, I saw the video! Learnt lots of new stuff, thank you!

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

      Glad you liked the video, thanks for reaching out!

  • @shub07s
    @shub07s 9 месяцев назад

    Thank you, sir. Your video really helped me in building my spring boot API project, I was struggling to convert byte file data to image in React. thanks again sir thank you

  • @usmanali-ql7rg
    @usmanali-ql7rg Год назад

    Such a great effort you're putting 😍keep this moral high👍 we're with you 🖤🖤❣️

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

      Thank you, I really appreciate your message of support. Comments like this really help me to stay motivated to keep creating!
      Even though it's not always easy it's been a great journey so far making this channel and I'm really pleased to hear that you are liking the content. This means a lot.
      Appreciated ❤

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

    Great video, i have a question about localstorage
    Could i get the same result without using localstorage set and get?
    only: ` img.src = url`
    and what's the difference?

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

      First, thanks so much for the feedback. Glad you liked the video!
      To your question: yes, you can generate a URL (Data URL or Blob URL) and use it to set the src of an image directly on the page it is created. No need for localStorage in this case.
      localStorage is useful if you want the image to be available if a user navigates to another page or returns for another visit. Then, you can store a Data URL in localStorage (it only works for a Data URL because it contains the image data represented in string format within it) and then you can retrieve it to set the src of an image beyond the page it was created.
      Hope that clears things up?
      I do have some other tutorials on localStorage in case you're interested:
      Intro to localStorage: ruclips.net/video/-ZRDZyUjEEI/видео.html
      Passing an image through localStorage: ruclips.net/video/XZ8CjU9eaVA/видео.html
      Passing an object or array through localStorage: ruclips.net/video/Txj88EreIp8/видео.html

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

      @@OpenJavaScript thanks for your reply and the video about localStorage, i'll do more practices.

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

    hi OpenJavascript (sorry i don't know your actual name) i really appreciate your efforts with JavaScript contents.. thank you so much, i'm grateful and i pray the GOD blessing will be overflowing in your life! take care

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

      Thank you, I really appreciate your kind words! Glad you are finding the content useful and hope you'll stick around for what's coming up :)

  • @anirbandas5852
    @anirbandas5852 3 месяца назад

    in this video you are only taking about images ... what about pdf files of around 20mb or more than that ... how to deal with this?

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

    Thanks!