Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Possible FileUpload bug #1840

Closed
Boglen opened this issue Jan 19, 2015 · 3 comments
Closed

Possible FileUpload bug #1840

Boglen opened this issue Jan 19, 2015 · 3 comments
Assignees
Milestone

Comments

@Boglen
Copy link

Boglen commented Jan 19, 2015

I'm try to using file upload from this commit
437eb93

Microsoft.AspNet.Mvc.ModelBinding have 6.0.0-beta3-12431 version.

View:

<div class="row">
    <div class="col-md-4">
        File Upload: <br />
        <form action="~/Storage/UploadFile" method="post" enctype="multipart/form-data">
            <input type="file" name="files" id="file1" />
            <input type="file" name="files" id="file2" />
            <input type="submit" value="submit" />
        </form>
    </div>
</div>

Controller:

    public class StorageController : Controller
    {
        public IActionResult UploadFile(IEnumerable<IFormFile> files)
        {
             ...
             return View("SuccessUploaded");
        }
    }

Seems to files is always 0 count. But Request.Form.Files contain two files.

ContentDispositionHeaderValue.Parse(f.ContentDisposition).FileName
surrounded with quotes and have Encoding iso-8859-1. This makes it difficult to use with non Western European languages.

@kichalla
Copy link
Member

FYI @ajaybhargavb

@yishaigalatzer
Copy link
Contributor

We are going to fix the quotes issue for Beta3, and followup with a bug in Http Abstraction for the aspnet/HttpAbstractions#175

@ajaybhargavb
Copy link
Contributor

Checked in - 67b0788

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants