Closed LeaFrock closed 8 months ago
Internal Ref: INT-3247
This is a bit out of scope of bugs and feature requests for this Issue tracker.
But I think using the HttpClient to upload the file seems a bit complicated since you would then need to get the blob data from the JS side to the wasm side then upload that using HttpClient on the wasm side that would likely take the byte array pass it out again to the JS side and use fetch API in the browser. Seem easier then to just call fetch directly with some minimal JS. Sure getting it in C# might make it easier to maintain however I think there is a runtime cost of doing that since you need to pass data back and forth between the runtimes and the images might be quite large.
Closing this ticket since it's not a bug more like a question.
I've read the related doc and known how to use
images_upload_handler
.But I wonder if we can implement the custom handler with
HttpClient
based on C# in Blazor, while theHttpClient
has already been configured with some properties/headers such asJWT
. Currently I have to write a special handler in JS, and it brings some cost of maintenance and deployment.