havit / Havit.Blazor

Free Bootstrap 5 components for ASP.NET Blazor + optional enterprise-level stack for Blazor development (gRPC code-first, layered architecture, localization, auth, ...)
https://havit.blazor.eu
MIT License
486 stars 67 forks source link

[doc] [HxInputFile] File upload access token question #820

Closed franky1017 closed 3 months ago

franky1017 commented 3 months ago

I see in your sample code for the file upload there is a code block about wasm:

// WASM: //var accessTokenResult = await AccessTokenProvider.RequestAccessToken(); //if (accessTokenResult.Status == AccessTokenResultStatus.Success) //{ // if (accessTokenResult.TryGetToken(out var token)) // { // accessToken = token.Value; // } //}

Do you have any doc for this? I am using the interactive auto mode so my component can be in either server side or wasm mode. Also do you have a sample code for the actual file upload end point api?

Thanks!

hakenr commented 3 months ago

I have slightly updated the docs to help users understand the usage.