Introduction to the Chrome File System Access API

Поділитися
Вставка
  • Опубліковано 1 сер 2024
  • Hello, my friends and fellow developers, I gave an introduction to how the new File System Access API works in Chrome and other Chromium-based browsers like Edge, Brave, etc.
    Let me know in the comments below if you want more JavaScript videos or any other videos.
    🔴 Subscribe here: bit.ly/2K5Ydaf
    ⌨ Localhost Discord Server: / discord
    Links in the video:
    FS API docs: web.dev/file-system-access/
    FS API detailed docs: wicg.github.io/file-system-ac...
    Other Tutorials:
    ⚛️ React and Material UI Todo App: bit.ly/reactmattodo
    🟨 Other JavaScript videos: bit.ly/jstutorials
    📘 Visual Studio Code videos: bit.ly/vscodevids
    🔋 Build a Battery App in JS: • 🔋 Build a Battery Info...
    Connect 🔗 :
    Twitter: / maxprogramming1
    Facebook: / max-programming-103081...
    GitHub: github.com/max-programming/
    🎥 Gear I use:
    🎤 Mic: amzn.to/3DGqEH9
    🎙️ Mic Holder: amzn.to/3NAnM2U
    🎧 Headphones: amzn.to/3Wy7CuZ
    ⌨ Keyboard: amzn.to/3E2mSci
    📷 Webcam: amzn.to/3Tb0Ice
    VS Code Theme used: codeSTACKr Theme
    Suggest, ask doubts in the comments and share these videos to help!
    Thanks for Watching!

КОМЕНТАРІ • 32

  • @abdicodes
    @abdicodes 3 роки тому +2

    Awesome video! This is so much better than using the file input element :D

    • @MaxProgramming
      @MaxProgramming  3 роки тому +2

      Absolutely! It really is!

    • @CodingMation
      @CodingMation 6 місяців тому +1

      ​@@MaxProgrammingBro this code work for android users or not because I make something but it not work please reply me if it work on android than I work on it because I change html file into apk by WebView and launch for android . You have any idea ?

  • @KGNHealthChannel
    @KGNHealthChannel 3 роки тому +2

    Very Easy to understand.
    Thank you very much.

  • @MelvinAdekanye
    @MelvinAdekanye 3 роки тому +2

    Love to see you back!!

  • @VincentLabStudio
    @VincentLabStudio 3 роки тому +2

    Welcome back and by the way great video.

  • @your_utube
    @your_utube 2 роки тому +1

    Thanks buddy!

  • @ProMakerDev
    @ProMakerDev 3 роки тому +2

    great job max, keep up!

  • @aazamiqbal668
    @aazamiqbal668 3 роки тому +2

    Useful great
    Keep it up

  • @Hotatoes
    @Hotatoes 3 роки тому +2

    Nice video bro keep on doing more man

  • @Aymeric486
    @Aymeric486 2 роки тому +3

    hey, nice video:) Can you directly set a path/to/file and the name of file to read and write? so that user don't have to select the file?

    • @MaxProgramming
      @MaxProgramming  2 роки тому +2

      Hey, thank you!
      You could specify a start directory in the options which is passed in showOpenFilePicker().
      But I don't think you can pass in a fixed path.
      Read about it here: wicg.github.io/file-system-access/#api-filepickeroptions-starting-directory

  • @GaneshKale-mw4eg
    @GaneshKale-mw4eg Рік тому +1

    How we can save ot download the file by using this file system api using js and java

    • @MaxProgramming
      @MaxProgramming  Рік тому

      You can read about saving files here on their official docs: web.dev/file-system-access/#write-file

  • @neontuts5637
    @neontuts5637 3 роки тому +2

    Nice video. Please can you create an image preview on file upload using Chrome File System Access API and all browser support.

    • @MaxProgramming
      @MaxProgramming  3 роки тому

      You can select an image using this Filesystem API and also you can preview that on the web page. But it's only for Chromium-based browsers like Chrome, Edge, Brave, etc. Doesn't work on Firefox as of now.

    • @MaxProgramming
      @MaxProgramming  3 роки тому

      The video on uploading and viewing image will be out soon ✌️

  • @pging8328
    @pging8328 3 роки тому +2

    how can one target firefox and safari for the file system api - are there work around solutions?

    • @MaxProgramming
      @MaxProgramming  3 роки тому +1

      You can use the navigator.userAgent in JavaScript to check on which browser the user is. And use the input tag if the browser is not chrome or chromium-based.
      Would you like to see a video on this very topic 🤝?

    • @pging8328
      @pging8328 3 роки тому +2

      @@MaxProgramming i personally would not see that tutorial because you explained in clearly above. My suggestion would be to make one only IF you think it would benefit others, and if you WANT to do one.

    • @MaxProgramming
      @MaxProgramming  3 роки тому

      Thanks for the suggestion. Glad you understood it ✌

  • @bishil06
    @bishil06 2 роки тому +1

    good video

  • @imsjpinternal9554
    @imsjpinternal9554 2 роки тому +1

    what if user cancels the uploading file!?

    • @MaxProgramming
      @MaxProgramming  2 роки тому

      Cancels while the file is uploading or in the file picker?

    • @imsjpinternal9554
      @imsjpinternal9554 2 роки тому +1

      @@MaxProgramming in the file picker

    • @MaxProgramming
      @MaxProgramming  2 роки тому

      @@imsjpinternal9554 Nothing will happen. It'll show an error in the console that user cancelled. You can use try catch block to show a message in the UI

    • @imsjpinternal9554
      @imsjpinternal9554 2 роки тому +1

      @@MaxProgramming Thank you so much

  • @martinmendez695
    @martinmendez695 Рік тому +1

    I dont think this works when the environment is not secure. For localhost or 127.0.0.1, it is fine. For a real world application, it does not.

    • @MaxProgramming
      @MaxProgramming  Рік тому

      For a real world app if it's HTTPS I think it does work