Experimental
Attaches a file to an input element on a web page, using the Matterway SDK context to execute the attachment process within the page.
The Matterway SDK context.
The MwFile object containing the file data and metadata to be attached.
The selector for the input element on the page.
Promise of void
const file = { name: 'example.txt', data: 'SGVsbG8gV29ybGQh', type: 'text/plain' };const selector = 'input[type="file"]';await mwFileToInput(context, file, selector); Copy
const file = { name: 'example.txt', data: 'SGVsbG8gV29ybGQh', type: 'text/plain' };const selector = 'input[type="file"]';await mwFileToInput(context, file, selector);
Attaches a file to an input element on a web page, using the Matterway SDK context to execute the attachment process within the page.