You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+65Lines changed: 65 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,71 @@ Then you can use `IFileSystemAccessService` to open one of the three dialogs ava
97
97
}
98
98
```
99
99
100
+
# Upgrade to version 4
101
+
Version 4 of this library made several breaking changes. To make the transition from version 3 or earlier to this version easier, I have made a small guide below for how you can upgrade.
102
+
## File/Directory picker options
103
+
We changed the method signatures for opening the directory and file picker dialogs to make them simpler to use.
104
+
105
+
To migrate replace the following:
106
+
-`OpenFilePickerOptionsStartInWellKnownDirectory` or `OpenFilePickerOptionsStartInFileSystemHandle` with `OpenFilePickerOptions`.
107
+
-`SaveFilePickerOptionsStartInWellKnownDirectory` or `SaveFilePickerOptionsStartInFileSystemHandle` with `SaveFilePickerOptions`.
108
+
-`DirectoryPickerOptionsStartInWellKnownDirectory` or `DirectoryPickerOptionsStartInFileSystemHandle` with `DirectoryPickerOptions`.
We removed the `FileSystemAccessOptions` parameter and all methods that previously accepted it as it duplicated functionality that could be achived in other ways.
131
+
132
+
Instead of using them, you need to configure an [importmap](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap) if you want to define custom paths for loading the helper modules from this library.
133
+
134
+
Blazor also has a native [ImportMap component](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/static-files?view=aspnetcore-10.0#importmap-component) that that plays well with fingerprinted resources.
The `ValuesAsync` method was removed from Blazor.FileSystem, and instead you should now use the `ValuesAsync` extension method available from Blazor.WebIDL.
138
+
139
+
This change was made to make easier to handle memory safely.
In the above example, we pass `true` for the `disposePreviousValueWhenMovingToNextValue` parameter, which is also the default. This means that it will dispose of each handle once it iterates past it. If you need the handles after iterating, you can pass `false` for this parameter instead.
164
+
100
165
# Issues
101
166
Feel free to open issues on the repository if you find any errors with the package or have wishes for features.
0 commit comments