Use HxInputFile without using endpoint? #587
Answered
by
hakenr
resignationinfinite
asked this question in
Q&A
|
I would like to use this component to upload a file using a service injected into the same page as the component rather than setting up a separate API endpoint on the server, is there a way to access the file stream itself in the HandleUploadClick method? |
Answered by
hakenr
Aug 30, 2023
Replies: 2 comments 1 reply
|
see |
0 replies
|
You can use the As mentioned by @rqx110, the |
1 reply
Answer selected by
hakenr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use the
HxInputFileCorecomponent which derives fromInputFileand supports all the regular file-upload techniques described here: https://learn.microsoft.com/en-us/aspnet/core/blazor/file-uploads?view=aspnetcore-7.0As mentioned by @rqx110, the
OnChangecallback is a good starting point.OnChangeis also published by theHxInputFilewhich wraps theHxInputFileCoreto a form-input withLabeland suchHxInputXyfeatures.