2 implementations of Files
Microsoft.AspNetCore.Http (1)
FormCollection.cs (1)
52public IFormFileCollection Files
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Binders\FormCollectionModelBinder.cs (1)
62public IFormFileCollection Files => new EmptyFormFileCollection();
46 references to Files
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.cs (1)
105.SetFormData(handler, new FormCollectionReadOnlyDictionary(form), form.Files);
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
102private static readonly MemberExpression FormFilesExpr = Expression.Property(FormExpr, typeof(IFormCollection).GetProperty(nameof(IFormCollection.Files))!);
Microsoft.AspNetCore.Http.Extensions.Tests (15)
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (15)
41Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]); 76Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]); 111Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]); 149Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]); 187Assert.Equal(httpContext.Request.Form.Files["file1"], httpContext.Items["file1"]); 192Assert.Equal(httpContext.Request.Form.Files["file2"], httpContext.Items["file2"]); 228Assert.Equal(httpContext.Request.Form.Files["file1"], httpContext.Items["file1"]); 231Assert.Equal(httpContext.Request.Form.Files["file2"], httpContext.Items["file2"]); 265Assert.Equal(httpContext.Request.Form.Files["my_file"], httpContext.Items["formFiles"]); 302Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]); 408Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]); 412Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]); 459Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]); 504Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]); 838Assert.Equal(httpContext.Request.Form.Files, formFilesArgument);
Microsoft.AspNetCore.Http.Tests (18)
Features\FormFeatureTests.cs (18)
224Assert.NotNull(formCollection.Files); 225Assert.Empty(formCollection.Files); 261Assert.NotNull(formCollection.Files); 262Assert.Empty(formCollection.Files); 297Assert.NotNull(formCollection.Files); 298Assert.Single(formCollection.Files); 300var file = formCollection.Files["myfile1"]; 346Assert.NotNull(formCollection.Files); 347Assert.Empty(formCollection.Files); 382Assert.NotNull(formCollection.Files); 383Assert.Single(formCollection.Files); 385var file = formCollection.Files["myfile1"]; 431Assert.NotNull(formCollection.Files); 432Assert.Single(formCollection.Files); 434var file = formCollection.Files["myfile1"]; 580Assert.NotNull(formCollection.Files); 581Assert.Single(formCollection.Files); 583var file = formCollection.Files["myfile1"];
Microsoft.AspNetCore.Mvc.Core (3)
ModelBinding\Binders\FormFileModelBinder.cs (1)
145foreach (var file in form.Files)
ModelBinding\FormFileValueProviderFactory.cs (2)
52if (form.Files.Count > 0) 54var valueProvider = new FormFileValueProvider(form.Files);
Microsoft.AspNetCore.Mvc.Core.Test (2)
ModelBinding\Binders\FormFileModelBinderTest.cs (1)
495formCollection.Setup(f => f.Files).Returns(formFiles);
ModelBinding\FormFileValueProviderFactoryTest.cs (1)
48var files = (FormFileCollection)context.ActionContext.HttpContext.Request.Form.Files;
Microsoft.AspNetCore.Mvc.IntegrationTests (6)
ComplexRecordIntegrationTest.cs (1)
4218fileCollection = (FormFileCollection)request.Form.Files;
ComplexTypeIntegrationTestBase.cs (1)
3717fileCollection = (FormFileCollection)request.Form.Files;
FormCollectionModelBindingIntegrationTest.cs (3)
60var file = Assert.Single(formCollection.Files); 107var file = Assert.Single(formCollection.Files); 152Assert.Empty(collection.Files);
FormFileModelBindingIntegrationTest.cs (1)
1272var fileCollection = (FormFileCollection)request.Form.Files;