Handling Files for Web Apps

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

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

  • @IvanStipic_Stiiv
    @IvanStipic_Stiiv Год назад +2

    Great stuff! I've learned more about managing files with JS from this video than from my entire 10-year career!

  • @AlphaWatt
    @AlphaWatt 2 года назад +1

    That was awesome. You have completely opened up a whole tool set for me now with caches! The practicality of what you demonstrated is enormous

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

    I learned so much from this series, thanks Professor Steve!

  • @J001-r4c
    @J001-r4c Год назад +1

    Great stuff!

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

    God bless u ! You just save me 100 tons of time :) ..I was about to create my own Cache API based on localforge lib

  • @charlenepeters2423
    @charlenepeters2423 2 года назад +1

    Thanks!

  • @woompaloompa
    @woompaloompa 2 года назад +1

    Big fan of your content!

  • @betogsmith615
    @betogsmith615 2 года назад

    Thanks for sharing!

  • @NikolaosZer
    @NikolaosZer 2 года назад

    Thank you very much! You are a great teacher!

  • @dgcp354
    @dgcp354 2 года назад

    I asked my question on the questions video like you asked, thanks for this one too

  • @dodokwak
    @dodokwak 2 года назад

    Very helpful. Thank you.

  • @yarcxxhassan4242
    @yarcxxhassan4242 2 года назад

    Thanks for what you do

  • @bikashranjandash9419
    @bikashranjandash9419 2 года назад +1

    Hi Steve Thanks for the excellent content. Is there a way to upload large files to server using a service worker?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 года назад +1

      Service workers use the same fetch method to upload files. File size restrictions are typically imposed on the serverside

  • @kingdan-x
    @kingdan-x 2 года назад +1

    What extension is making the colors between your brackets?? It's very cool

  • @mahsamanouchehri
    @mahsamanouchehri 10 месяцев назад

    Thanks🤩

  • @nro337
    @nro337 2 года назад

    Thank you!

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

    Hi Steve! Could you explain the best method for the following process:
    1. User inputs text into text area
    2. User presses submit button and submits the text into local/session storage
    3. Storage is called by a javascript function that stringify's the text and holds it as an object

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад +2

      When the user is filling out a form you can either listen for the input event on each of the inputs / textareas or you can listen for the form submit event which would let you handle the whole form at once.
      You can't submit a form to local/session storage. The form submit event would let you call a function and in that function you can use localStorage.setItem( ) to save the data from the form in localStorage. Before calling setItem though you would take all the data from the form by calling
      let fData = new FormData(formReference)
      The formReference is the a reference to the HTML form in your web page.
      Then call
      let obj = fData.entries( )
      to convert the formData object into a plain JS object.
      Then convert the object to JSON with
      let str = JSON.stringify(obj);
      The string is what you would send to localStorage with setItem()

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

      @@SteveGriffith-Prof3ssorSt3v3 wow thanks man! I'll give this a spin I really appreciate it

  • @hasanmougharbel8030
    @hasanmougharbel8030 2 года назад

    Hey there,keep up the great work in your channel.
    I have only a general enquiry as a newbie sql learner.
    Could i channel shopify live data into an sql application? (This should be an application developed for a company of 50 employees mainly for the sake of generating reports and analytics))
    Is this an easy process to undertake as a sql beginner? What should i keep in mind
    and what are the tools or softwares that i should work with right from the beginning.
    For notice, I made my mind to work with microsoft sql server, also our company has a dedicated server.
    Thanks for taking care of my enquiry

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

    Hi professor! Hi have an express.js server that sends an image/png stored in my local file system to the frontend when a route is hit. The image is shown properly when I use Postman. However, I cannot figure out a way to display the image on an html javascript browser/client.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад

      If you are returning the actual image then you just set the endpoint as your img src in the html

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

      @@SteveGriffith-Prof3ssorSt3v3 I did that but it does not work. Do you have any video on retrieving data directly as an image or as a blob and displaying it on a browser?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад +2

      @@worldwide6626 This tutorial shows how. The part about taking files from the Cache and putting them on the page. Shows how to extract a file from a Response object and put it on the page. A response object is the same regardless of whether it comes from a Cache with caches.match( ) or from a fetch( ) call.
      I also have a playlist about making Fetch calls - ruclips.net/video/7EKebb4VUYQ/видео.html
      and a playlist about working with Files, Blobs, etc - ruclips.net/video/7fybEXre70o/видео.html

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

    20:20 I personally thinks that using FileReader Object is a better practice, file.arrayBuffer is just not very intuitive to me.
    But still, great video, thank you!

  • @charlenepeters2423
    @charlenepeters2423 2 года назад

    Kind of disappointed that you don't have a "Buy Me A Coffee'" link, or does that go against your complete agreement with your college?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 года назад

      I have the super thanks button the heart with the dollar sign icon. People can make donations to thank me there. 😀

    • @charlenepeters2423
      @charlenepeters2423 2 года назад

      @@SteveGriffith-Prof3ssorSt3v3 Huh... never knew that existed. Thanks!

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

    How do I retrieve and print the name of the file the user selected ?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад

      The files array that comes from the element is an array of File objects. Each one has a name property.

  • @ΕγωΕγω-ρ6ω
    @ΕγωΕγω-ρ6ω 5 месяцев назад

    Thank you!i would like to ask you if there is a video of a booking calendar .i have been searching a lot lately on the internet but i didn't find anything.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  5 месяцев назад

      Do you mean a tutorial on how to build a booking calendar? I don't know. That's a very specific and complex project. Not sure if anyone has done a tutorial on that.

  • @shahinza
    @shahinza 2 года назад

    Thank you!