@@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 ?
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 🤝?
@@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.
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.
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
@@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
Awesome video! This is so much better than using the file input element :D
Absolutely! It really is!
@@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 ?
Love to see you back!!
Welcome back and by the way great video.
Very Easy to understand.
Thank you very much.
Glad to hear that
Nice video bro keep on doing more man
Thank you 😄
Useful great
Keep it up
great job max, keep up!
Thanks 😃
Thanks buddy!
How we can save ot download the file by using this file system api using js and java
You can read about saving files here on their official docs: web.dev/file-system-access/#write-file
how can one target firefox and safari for the file system api - are there work around solutions?
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 🤝?
@@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.
Thanks for the suggestion. Glad you understood it ✌
Nice video. Please can you create an image preview on file upload using Chrome File System Access API and all browser support.
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.
The video on uploading and viewing image will be out soon ✌️
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?
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
good video
what if user cancels the uploading file!?
Cancels while the file is uploading or in the file picker?
@@MaxProgramming in the file picker
@@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
@@MaxProgramming Thank you so much
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.
For a real world app if it's HTTPS I think it does work