Bootstrap File Input with ASP.NET MVC

0

I'm using the Bootstrap File Input ( link ) in my Asp.Net MVC project but it has a bug that when I add some file and then add another it continues displaying on the screen all but only put the last files added. Has anyone had this and solved it? The maximum I got was in the $ ("# File") method fileinput ('getFileStack') that returns an array of the files but I am also not able to post this array to the server. I'm waiting. Thank you.

Below is the portion of View where the upload is.

@using (Html.BeginForm("Create", "ContaPagar", FormMethod.Post, new { @enctype = "multipart/form-data" }))
            {
                <div class="col-md-12 form-group">
                    @Html.TextBoxFor(x => x.File, new { type = "file", multiple = "true", @accept = "application/pdf", @class= "file", @id= "File", Name = "File" })
                    <br>
                </div>

                <div class="col-md-3 pull-right form-group">
                    <div class="btn-group">
                        <button id="btnSalvar" name="btnSalvar" type="submit" class="btn btn-success">Salvar Pagamento</button>
                    </div>
                </div>                
                }

And on the server I get the files through Request.Files . The problem is that when I add files and add others later (eg Add 2.pdf and then 3 more .pdf totaling 3) it just posts the last ones added.

    
asked by anonymous 24.01.2017 / 13:27

0 answers