attach()
Attaches a file to a file input element.
Examples
Section titled “Examples”await attach('c:/abc.txt', to('Please select a file:'))await attach('c:/abc.txt', 'Please select a file:')await attach('c:/abc.txt', 'Please select a file:',{force:true})Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
filepath | string | Array | or filepaths- The path or paths of the file to be attached. |
to | selector | string | The file input element to which to attach the file. |
options | unknown | Default: {}. |
Returns
Section titled “Returns”This API does not return any values.