Saving files goes perfectly with picking a folder, don't you think? Good thing I have a video on FolderPicker as well 📂 kzbin.info/www/bejne/ooDdcop9qLx-nJY Or you just enjoy watching my videos? Then I have a playlist about .NET MAUI in general for you, right here 👉 kzbin.info/www/bejne/ooDdcop9qLx-nJY
@acodersjourney10 ай бұрын
A big shoutout for the incredible work you do in simplifying coding challenges. Your videos have been a lifesaver!
@jfversluis10 ай бұрын
Appreciate that 🥰 thank you!
@marshalstewart7776 Жыл бұрын
Literally was googling docs on how to use feature in the community toolkit today and saw the video posted later. Great stuff appreciate the great videos!
@jfversluis Жыл бұрын
Haha that is great! Hope this was helpful then!
@sandeepsirohi8434Ай бұрын
Hi Gerald, Thanks for a nice video as usual. One question though, Is it possible to store files/data in a folder on root/internal memory(API 34)?
@ademineshat Жыл бұрын
Thanks for sharing. You asked for opinions ☺️ I would say short and simple: "little things or details make the difference" 👍 I see in every video you go very quick and skip the details. I would be nice to have complete tutorials, which will look nice and also fully functional. This was my opinion! Thank you
@jfversluis Жыл бұрын
Thanks! To be honest there aren’t much more details to this 🤷♂️ also each app will be different. One person will want to see all the details that fits in their app wile someone else might be interested in another thing. It will be impossible to make the perfect video for everyone. That’s why I try to show you the basics and how to get started so you can take it from there and make it fit in your own situation. Thank you, appreciate it!
@berniemueller2827 Жыл бұрын
Could you also do a video on saving a file to External Storage, so that the user of the device could access the file outside of the app?
@josedonizeteoliveirajunior1744 Жыл бұрын
It really got easier! thank you amazing channel
@jfversluis Жыл бұрын
Thank you! I would maybe like to see also an option where you can save a file without showing a dialog first. Would that be helpful?
@josedonizeteoliveirajunior1744 Жыл бұрын
@@jfversluis Certainly
@ebrahimmehri9 ай бұрын
Excellent! Thank you.
@jewersp Жыл бұрын
This is awesome, Gerald. It would be great to see how this works on the other platforms.
@jfversluis Жыл бұрын
It should be more or less the same, go try it out ;)
@GianfrancoTronu Жыл бұрын
Thank You very much indeed for this video !
@jfversluis Жыл бұрын
You’re very welcome!
@MatiHalek10 ай бұрын
Hello, thank you (from Poland) for all these videos! They help me because I'm struggling with MAUI, especially with random exceptions without description. Also, I have a question because I'm doing a school project with MAUI (advertising system): I would like to know if it is possible to save an image downloaded from FilePicker (my last line: var stream = await result.OpenReadAsync();) to the project directory (e.g. Images, instead of showing dialog) and how to then specify the target path in code?
@navarone7710 ай бұрын
Hey there, I was also having troubles turns out for me the FilePicker and a few others have changed, you no longer need to dependency inject it and you can use the static class directly. Remove IFilePicker from AddSingleton, remove it from Constructor on MainPage and just change the line to be: await FileSaver.Default.SaveAsync(etc...) Hope it helps
@x12624 Жыл бұрын
Hi Gerald, This is cool. I am guessing this can only be used on the client side, but not server side. For example, can I use this in a class library that's running on a server?
@jfversluis Жыл бұрын
.NET MAUI is client-side so yes, this only works on the client
@flrcml694 ай бұрын
Hi @Gerald Versluis How to save a file .db with FileSaver in a chois folder with FolderPicker?
@tahirkhan466 Жыл бұрын
Thanks for the hard work, please make a tutorial on how to see an image from a list of images in full screen and then we will have options to delete or save that image in the device gallery using .net MAUI
@Neha-lh6ok Жыл бұрын
Thanks for sharing ! i was able to save the file but unable to open the attachment in its downloaded format example if i am downloading the png or jpg file the file format is being corrupted or is not in supported format same goes with txt or pdf files can you please suggest something to resolve this
@anandshindey Жыл бұрын
very nice, just what I needed. Thanks.
@jfversluis Жыл бұрын
Thanks great, good luck!
@abelanil Жыл бұрын
As you say, is amazing. Thanks
@jfversluis Жыл бұрын
You’re welcome!
@AthiraRNAIR-gr7gc9 ай бұрын
Hello. I was going through an option to download a large file in Maui. One time it's working with file Saver communitkit. For large files our api pull it as chunks. So need to merge and create the actual file. Can you help me if you have any idea on if this supports that . Also a progress bar , as it's big and user needs to know how long to wait ofcourse. 😊 It ll be very helpful if you can give some pointers. From India 😊
@TechnoNewsUpdates7 ай бұрын
How to update the content of zip folder as i use filesaver to save the file but i don't have idea to update the file as i tried to get the modifiedstream and have an idea to just place that stream inside new zip file and delete that existing one but can we get the real path of that file so i can save over there.
@earthlingthings4 ай бұрын
So, what if I wanted to do this dialogue from a viewmodel class or any other sub class not on the xaml.cs page?
@jfversluis4 ай бұрын
Wrap it in some kind of service class and maybe use dependency injection
@earthlingthings24 күн бұрын
There is an issue when user omits the file extension. Eg .txt the file gets saved without an extension. Can we not have a passed in file type which forces an extension??
@jfversluis22 күн бұрын
Make sure to report it to the repo!
@chezchezchezchez Жыл бұрын
I saw you traversed the file system and opened the newly created file. Perfect. How do you do that on the android emulator ? Thank you very much.
@chezchezchezchez Жыл бұрын
Anyone?
@jfversluis Жыл бұрын
Not sure what you mean :)
@chezchezchezchez Жыл бұрын
@@jfversluis I think I figured it out but what I meant was …. You had windows “pop up” a file dialog box where you could select a file. I wanted to see that on Android! I ran it at home and it seems to work. (Shows android file picker thing) Why doesn’t “file filter” (show images or audio files only) have one for .txt or text files? Also what’s the best way to have a user save/import text files? I want them to backup/restore the SQLite db. Thanks!!
@davidsutton6863 Жыл бұрын
Can you show us how to store a file without the user dialog please Gerald?
@jfversluis Жыл бұрын
Sure! What's not clear? It should not be different than regular .NET: File.SaveAllText("file.txt", myLinesCollection);
@davidsutton6863 Жыл бұрын
@@jfversluis Thanks Gerald, that did the trick.
@DanielAncines Жыл бұрын
Hey Gerald, how are you doing? Did you notice if you click Cancel on the Dialog Window, the program crashes? I've been getting CommunityToolkit.Maui.Storage.FileSaveException: 'Path doesn't exist.'. See yaa! Update: forget, I saw on your repo that you put a try there, is this an expected behavior or an issue?
@jfversluis Жыл бұрын
It's demo code... ;) Yeah that is why I mention that you need to do a try/catch around it. It throws an exception when you cancel. Personally I thought this was very weird so provided that feedback and I think PRs are being merged right now to change that behavior. Thanks!
@DanielAncines Жыл бұрын
@@jfversluis yeah, I think the same, thank you!
@surdz Жыл бұрын
can i implement this in maui blazor?
@jfversluis Жыл бұрын
Yep!
@markusf.meisinger5832 Жыл бұрын
Hi Gerald, always appreciate your videos a lot! Can you show this how it is done on .NET 7 Android 13 API 33? Thanks! It works like a charme on Android less then API 33
@markusf.meisinger5832 Жыл бұрын
I did it now for Android 13, API 33 by the help of Intent.ActionCreateDocument and ActivityResultLauncher, works perfectly and on Windows platform I still use this ease of FileSaver
@daniblitz1029 Жыл бұрын
does this work on Android? i was trying to save a power point presentation on android, but it says that it can't find the file. It's strange, because on windows machine it works. Does anyone know?
@marcosdalmolin357 Жыл бұрын
In Android, it doesn't work; the window to save the file doesn't open for me.Does anyone know how to do it?. Thank you. I'm using MAUI Hybrid.
@trendytrailer2746 Жыл бұрын
Sir please make a video for social login like google, facebook and facebook for maui and xamarin
@Golden_games Жыл бұрын
can this be used to save vidoes or music
@jfversluis Жыл бұрын
Should be possible!
@Golden_games Жыл бұрын
@@jfversluis great I will give it a try
@cesarcarvajal9483 Жыл бұрын
Do I need to validate EXTERNAL_STORAGE in my permissions?
@jfversluis Жыл бұрын
If you want to save there then yes
@haha-hk9tx Жыл бұрын
This doesn't work on android 13 due to the WRITE_EXTERNAL_STORAGE permission no longer existing. Will there be any fix?
@haha-hk9tx Жыл бұрын
*On .NET 7
@jfversluis Жыл бұрын
If you think there is a potential bug look on the repo if it’s reported already or open a new issue
@ghalaii2013 Жыл бұрын
HI.. Installation of CommunityToolkit.Maui on existing solution failed, any clue??
@jfversluis Жыл бұрын
Not without any details. I’m still not a mind reader 😔
@ghalaii2013 Жыл бұрын
@@jfversluis I am following the steps to install the CommunityToolkit.Maui package, installation process finishes normally, but when I check the installed packages it is not there... no more details to provide
@DasgoodWernerdk Жыл бұрын
@@ghalaii2013 check the version of your Project Net Framework and the dependency of the Toolkit Nuget package. You need to be on the same versions.
@ChristopherMcDaniel-gv8pw Жыл бұрын
I found something strange using this. When I try to write to a file that already exists, instead of completely erasing the file contents(as you would expect with a typical write operation), it actually only overwrites the first x number of bits. Example, if I initially wrote "Hello World! My Name is Chad!" with FileSaver, and then I wrote "I am using MAUI" to the same file, I would get this: I am using MAUI Name is Chad! As if it is only overwriting the first x bits for the length of the new file contents. Is this expected behavior or is this an issue?
@jfversluis Жыл бұрын
Oh that’s interesting. I wouldn’t think that is the intended behavior. Could you please have a look of there is an issue on the repo describing this or otherwise open one?
@chezchezchezchez Жыл бұрын
What did you find out, my friend?
@ChristopherMcDaniel-gv8pw Жыл бұрын
@@chezchezchezchez Last I checked, the issue was still being fixed. I haven't seen updates in a while. There was a GitHub thread pertaining to the issue, so maybe it will be addressed soon!
@babyj98 Жыл бұрын
Gerald, is it possible to save a pdf as well by any chance?
@jfversluis Жыл бұрын
Sure as long as you have the contents of said PDF as a byte array you can save it
@babyj98 Жыл бұрын
@@jfversluis Is that documented somewhere by any chance?
@jfversluis Жыл бұрын
Not that I know off
@babyj98 Жыл бұрын
@@jfversluis OK because I'm getting a error to where it makes the file but it says "can't open the file, something went wrong". I'll keep toying with it though thank you good sir.
@cesarcarvajal9483 Жыл бұрын
@@babyj98 you succeeded? I manage to save the document but when I open my file it tells me that it is not a pdf
@ceramicellasy3392 Жыл бұрын
hello i cant save any image by filesaver
@jfversluis Жыл бұрын
If you think there is a bug, Make sure to report it on the repository with details like a code or ideally a reproduction and any error messages you see
@ceramicellasy3392 Жыл бұрын
@@jfversluis if i can ask you when i used drag and drop with image from stream i had exaptation you cant access file close
@fitrihalim9323 Жыл бұрын
I see it is not yet supported on .Net 6 :(
@jfversluis Жыл бұрын
That is correct! .NET 7 and up
@swetajaiswal8383 Жыл бұрын
Then how we do that in .net 6
@markusf.meisinger5832 Жыл бұрын
It even does not work on .NET 7 Android 13 API 33 :(