File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/Components/Endpoints/src/FormMapping/Metadata Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ internal partial class FormDataMetadataFactory(List<IFormDataConverterFactory> f
1717 private readonly FormMetadataContext _context = new ( ) ;
1818 private readonly ParsableConverterFactory _parsableFactory = factories . OfType < ParsableConverterFactory > ( ) . Single ( ) ;
1919 private readonly DictionaryConverterFactory _dictionaryFactory = factories . OfType < DictionaryConverterFactory > ( ) . Single ( ) ;
20- private readonly FileConverterFactory ? _fileConverterFactory = factories . OfType < FileConverterFactory > ( ) . SingleOrDefault ( ) ;
20+ private readonly FileConverterFactory _fileConverterFactory = factories . OfType < FileConverterFactory > ( ) . Single ( ) ;
2121 private readonly CollectionConverterFactory _collectionFactory = factories . OfType < CollectionConverterFactory > ( ) . Single ( ) ;
2222 private readonly ILogger < FormDataMetadataFactory > _logger = loggerFactory . CreateLogger < FormDataMetadataFactory > ( ) ;
2323
@@ -87,6 +87,12 @@ internal partial class FormDataMetadataFactory(List<IFormDataConverterFactory> f
8787 return result ;
8888 }
8989
90+ if ( _fileConverterFactory . CanConvert ( type , options ) )
91+ {
92+ result . Kind = FormDataTypeKind . File ;
93+ return result ;
94+ }
95+
9096 if ( _dictionaryFactory . CanConvert ( type , options ) )
9197 {
9298 Log . DictionaryType ( _logger , type ) ;
You can’t perform that action at this time.
0 commit comments