-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
System.MissingMethodException: Method not found: void KristofferStrube.Blazor.Streams.WritableStream..ctor(Microsoft.JSInterop.IJSRuntime,Microsoft.JSInterop.IJSObjectReference) at KristofferStrube.Blazor.FileSystem.FileSystemWritableFileStream.CreateAsync(IJSRuntime jSRuntime, IJSObjectReference jSReference) at KristofferStrube.Blazor.FileSystem.FileSystemFileHandle.CreateWritableAsync(FileSystemCreateWritableOptions fileSystemCreateWritableOptions)
I "can" read files, so I assume I have setup all the basics properly.
just the writing is a problem when it gets to the "CreateWriteableAsync"
sample below...
` async public Task<FileSystemFileHandle?> SaveFilePicker(WellKnownDirectory? _StartIn = null) {
try {
var options = new SaveFilePickerOptionsStartInWellKnownDirectory {
Types = [
new FilePickerAcceptType {
Description = "json Files",
Accept = new() { { "json/*", value } }
}
],
StartIn = _StartIn,
};
return await FileSystem.ShowSaveFilePickerAsync(options);
} catch (System.Runtime.InteropServices.JavaScript.JSException ex) {
Console.WriteLine(ex.Message);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
return null;
}
async void ExportTest(){
FileSystemFileHandle? h = await SaveFilePicker();
if (h != null) {
var writable = await h.CreateWritableAsync();
await writable.WriteAsync("a quick test");
await writable.CloseAsync();
}
}
}
`
Metadata
Metadata
Assignees
Labels
No labels