Skip to content

Workspace.on('receive-files-menu') method

Workspace › on(‘receive-files-menu’)

Unofficial

Triggered when user shares files on mobile.

Signature:

on(name: "receive-files-menu", callback: (menu: Menu, files: TFile[]) => void, ctx?: unknown): EventRef

Parameters:

ParameterTypeDescription
name"receive-files-menu"Should be 'receive-files-menu'.
callback(menu: Menu, files: TFile[]) => voidThe callback function.
ctx?unknownThe context passed as this to the callback function.

Returns: EventRefThe event reference.

Example:

app.workspace.on('receive-files-menu', (menu, files) => {
console.log(menu, files);
});