hydrostack / hydro

Hydro brings stateful and reactive components to ASP.NET Core without writing JavaScript
https://usehydro.dev
MIT License
697 stars 17 forks source link

How to upload multiple files using IFormFile ? #92

Open Tva540 opened 10 hours ago

Tva540 commented 10 hours ago

I have followed the instructions in the documentation to upload files, it works fine for single file upload, but in my use case I want to upload multiple files in one go, I tried using like the code below, but the Bind method does not catch the breakpoint either.

[Transient] public List<IFormFile?> Uploads { get; set; }

<input class="form-control" asp-for="@Model.Uploads" hydro-bind type="file" multiple>

public override async Task BindAsync(PropertyPath property, object value) { if (property.Name == nameof(Uploads)) DocumentIds= await GetStoredTempFileName((List<IFormFile?>)value); }

kjeske commented 8 hours ago

There was a discussion about it here as well. It's missing in Hydro currently, but will be shortly fixed :) Thanks for creating issue, I will use it to track the progress.

Tva540 commented 6 hours ago

There was a discussion about it here as well. It's missing in Hydro currently, but will be shortly fixed :) Thanks for creating issue, I will use it to track the progress.

Thanks for the fast response, looking forward for this feature asap. ✌️