Add functions to store blob, get blob, directly assign blob to html element#46
Add functions to store blob, get blob, directly assign blob to html element#46Tailslide wants to merge 20 commits into
Conversation
Very fast but still have to base64 encode values read back.
Working Add method that returns blobs in .NET shared memory bufffer. Very fast but still have to base64 encode values read back.
…/DnetIndexedDb into SharedMemoryBlobReturn
|
Do you think it's far away to get this PR merged? |
Hi there. I am working on a more extensive set of components for Blazor which I want to release together with the release of .Net6, this is the reason why I have not been able to spend a lot of time carefully reviewing the contributions they have made and for which I am grateful to collaborators. I will try in the next few days to review what is pending and publish a new version. If it is not possible, after the launch of .Net6 I will be able to publish a new version. Thank you very much for using the library |
For .NET 6 will you support reading and writing blobs/files as a stream using the latest JsRuntime (dotnet/aspnetcore#34817)? |
There is also a new WASM test project where you can play with the new functions
Implements Issue #45
Add a binary blob to the store
string AddBlobItem<TEntity>(string objectStoreName, TEntity item, string mimeType, string key = "")Update binary blob in the store
string UpdateBlobByKey<TEntity>(string objectStoreName, TEntity item, string mimeType, string key)Get marshalled base 64 encoded blob from the store (slow!)
ValueTask<string> GetBlobByKey(string objectStoreName, key)Get unmarshalled blob from the store int .net buffer (fast)
ValueTask<string> GetBlobByKey(string objectStoreName, key, byte[] destination, int maxBytes)Assign blob directly to HTML element without marshalling into .NET (fast)
ValueTask<string> AssignBlobToElement(string objectStoreName, string key, string elementId, string attribute)