--- title: FileInput Component group: Component Gallery --- The `` component beautifies the browsers default HTML file Input, supporting both Single file: ```html ```
and Multiple File Uploads: ```html ```
Use **files** when your binding to a `UploadedFile` complex type or **values** when binding to a `string[]` of file paths. When binding to relative paths, absolute URLs are resolved using [assetsPathResolver](/vue/use-config). ## Invoking APIs containing uploaded files When uploading files, you'll need to submit API requests using the `apiForm` or `apiFormVoid` methods to send a populated `FormData` instead of a Request DTO, e.g: ```html
Save ``` ## Integrates with Managed File Uploads Using [Managed File Uploads](/locode/files-overview) is a productive solution for easily managing file uploads where you can declaratively specify which location uploaded files should be written to, e.g: ```csharp public class UpdateContact : IPatchDb, IReturn { public int Id { get; set; } [ValidateNotEmpty] public string? FirstName { get; set; } [ValidateNotEmpty] public string? LastName { get; set; } [Input(Type = "file"), UploadTo("profiles")] public string? ProfileUrl { get; set; } public int? SalaryExpectation { get; set; } [ValidateNotEmpty] public string? JobType { get; set; } public int? AvailabilityWeeks { get; set; } public EmploymentType? PreferredWorkType { get; set; } public string? PreferredLocation { get; set; } [ValidateNotEmpty] public string? Email { get; set; } public string? Phone { get; set; } [Input(Type = "tag"), FieldCss(Field = "col-span-12")] public List? Skills { get; set; } [Input(Type = "textarea")] [FieldCss(Field = "col-span-12 text-center", Input = "h-48", Label= "text-xl text-indigo-700")] public string? About { get; set; } } ``` This metadata information is also available to [AutoForm components](/vue/autoform) which supports invoking APIs with uploaded files: ```html ```