/* * Copyright (c) 2025, Salesforce, Inc. * All rights reserved. * For full license text, see the LICENSE.txt file */ /** * The `lightning/fileUpload` component provides an integrated way for users to upload multiple files. * @see {@link https://developer.salesforce.com/docs/component-library/bundle/lightning-file-upload/documentation | Lightning File Upload Documentation} */ declare module "lightning/fileUpload" { import { LightningElement } from "lwc"; /** * A component to provide an integrated way for users to upload multiple files. */ export default class LightningFileUpload extends LightningElement { /** * Specifies the name of the input element. */ name: string; /** * The text label for the file uploader. */ label: string; /** * Comma-separated list of file extensions that can be uploaded * in the format ['.ext'], such as ['.pdf', '.jpg', '.png']. */ accept: string[]; /** * The record Id of the record that the uploaded file is associated to. */ recordId: string; /** * Specifies whether this component should be displayed in a disabled state. * Disabled components can't be clicked. The default is false. */ disabled: boolean; /** * Specifies whether a user can upload more than one file simultaneously. * The default is false. */ multiple: boolean; /** * Name of a custom field on the ContentVersion object. Set its value with the file-field-value attribute. */ fileFieldName: string; /** * Value to store in the custom field specified by file-field-name for the uploaded file. */ fileFieldValue: string; /** * If present, the file-upload field is set to required as true */ required: boolean; /** * A Boolean value for aria-invalid. */ // @ts-expect-error: Property 'ariaInvalid' in type 'LightningFileUpload' is not assignable to the same property in base type 'LightningShadowBaseClass'. // Type 'boolean' is not assignable to type 'string'. ariaInvalid: boolean | undefined; /** * Focuses on the lightning-input when called. */ focus(): void; /** * Displays the error messages and returns false if the input is invalid. * If the input is valid, reportValidity() clears displayed error messages and returns true. */ reportValidity(): boolean; /** * Sets a custom error message to be displayed when a form is submitted. */ setCustomValidity(message: string): void; } }