1 implementation of FileName
Microsoft.AspNetCore.Http (1)
FormFile.cs (1)
70public string FileName { get; }
28 references to FileName
FilesWebSite (1)
Controllers\UploadFilesController.cs (1)
35files.Add(keyValuePair.Key, keyValuePair.Value?.Select(formFile => formFile?.FileName).ToList());
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Binding\FormDataMapperTests.cs (3)
1950element => Assert.Equal("file-1.txt", element.FileName), 1951element => Assert.Equal("file-2.txt", element.FileName), 1952element => Assert.Equal("file-3.txt", element.FileName)
Microsoft.AspNetCore.Http.Extensions.Tests (10)
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (10)
113Assert.Equal("file.txt", fileArgument!.FileName); 151Assert.Equal("file.txt", fileArgument!.FileName); 189Assert.Equal("file1.txt", file1Argument!.FileName); 194Assert.Equal("file2.txt", file2Argument!.FileName); 267Assert.Equal("file.txt", fileArgument!.FileName); 304Assert.Equal("file.txt", fileArgument!.FileName); 414Assert.Equal("file.txt", fileArgument!.FileName); 461Assert.Equal("file.txt", fileArgument!.FileName); 506Assert.Equal("file.txt", fileArgument!.FileName); 840Assert.Equal("file.txt", formFilesArgument!["file"]!.FileName);
Microsoft.AspNetCore.Http.Tests (2)
Features\FormFeatureTests.cs (2)
302Assert.Equal("temp.html", file.FileName); 387Assert.Equal("t\u00e9mp.html", file.FileName);
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\Binders\FormFileModelBinder.cs (1)
148if (file.Length == 0 && string.IsNullOrEmpty(file.FileName))
ModelBinding\FormFileValueProvider.cs (1)
51if (file.Length == 0 && string.IsNullOrEmpty(file.FileName))
Microsoft.AspNetCore.Mvc.Core.Test (2)
ModelBinding\Binders\FormFileModelBinderTest.cs (2)
288Assert.Equal("file1.txt", file.FileName); 503formFile.Setup(f => f.FileName).Returns(filename);
Microsoft.AspNetCore.Mvc.IntegrationTests (5)
BindingSourceMetadataProviderIntegrationTest.cs (1)
108Assert.Equal("text.txt", boundPerson.File.FileName);
ComplexRecordIntegrationTest.cs (2)
686Assert.Equal("text.txt", document.FileName); 743Assert.Equal("text.txt", document.FileName);
ComplexTypeIntegrationTestBase.cs (2)
689Assert.Equal("text.txt", document.FileName); 746Assert.Equal("text.txt", document.FileName);
Sample (3)
Program.cs (3)
56forms.MapPost("/form-file", (IFormFile resume) => Results.Ok(resume.FileName)); 58forms.MapPost("/form-file-multiple", (IFormFile resume, IFormFileCollection files) => Results.Ok(files.Count + resume.FileName)); 64forms.MapPost("/forms-pocos-and-files", ([FromForm] Todo todo, IFormFile file) => Results.Ok(new { Todo = todo, File = file.FileName }));