-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Serialize / Deserialize object to be able to store in indexedDB #18
Comments
Hey, Marcus. Awesome idea. I think this would be possible with minor changes to some constructors that are currently Would being able to do something like this sound good to you? FileSystemHandle handle = new FileSystemHandle(JSReference);
FileSystemFileHandle handle = new FileSystemFileHandle(JSReference);
FileSystemDirectoryHandle handle = new FileSystemDirectoryHandle(JSReference); I think that would just be a minor release as I only add to the existing API surface. Alternatively, I could add a custom I can work on this next week. |
The public constructor would solve it for me so that would be awsome. 😀 Thanks! |
Currently, I also parse the FileSystemHandle handle = await FileSystemHandle.CreateAsync(JSReference, JSRuntime);
FileSystemFileHandle handle = await FileSystemFileHandle.CreateAsync(JSReference, JSRuntime);
FileSystemDirectoryHandle handle = await FileSystemDirectoryHandle.CreateAsync(JSReference, JSRuntime); |
Excellent! |
Yep @fixnil, I figured it was something similar that you were looking for. I will make sure to add a demo of using it to write to IndexedDB. Is there any Blazor library that you can recommend for working with IndexedDB? |
Maybe this one: https://github.com/Tavenem/Blazor.IndexedDB |
I am currently facing some problems writing the demo with IndexedDB so I might not use that as the final demo. To clarify my problem with using https://github.com/wtulloch/Blazor.IndexedDB which I chose as my IndexedDB library: Currently, you can't have The issue in the ASP.NET Core repo that keeps track of this issue and many others related to JSInterop is the follow: dotnet/aspnetcore#31151 |
I got it resolved and created the IndexedDB demo. |
Love this package, made my life a lot easier.
I am just missing one thing and thats the posibility to serialize / deserialize a filehandler to be stored in indexeddb.
I am able to serialize using the JSReference but am unable to deserialize it to a FileSystemHandler, would be a great feature.
The text was updated successfully, but these errors were encountered: