Binding file uploader in Blazor not working with @bind attribute in razor component
i've build the model when the form is Submit using two way binding parameter and it works for standard componenent except file uploader,
i don't know what is the paramter type for binding file uploader
here is my Submit function
protected async Task OnSubmit()
{
...
error = null;
try
{
...
//nikImagewas my intention to 'hold' the file image. its type is IFormFile
customer.NIKImage = nikImage;
var response = await _state.PostAsync(WebsVariables.Urls.CreateCustomerDraftObject, customer);
if (response.IsSuccessStatusCode)
{
...
}
else
{
var msg = await response.Content.ReadAsStringAsync();
_toastService.ShowError(msg);
}
//clear();
this.StateHasChanged();
}
catch (Exception ex)
{
error = ex.Message;
}
}
when i try it, the nikImage is null i expected i can manipulate the file before POST it to my web API