register_drop_sniffer
Recognise a file kind of this plugin's own when it is dropped on the window.
from plexora.api import register_drop_snifferregister_drop_sniffer(fn) -> NoneThe desktop app asks the server what dropped files are before doing anything with them. Core knows images, masks, cell tables and channel lists; a sheet that belongs to a plugin -- gating's gates CSV, say -- would otherwise be read as a table of cells. A sniffer sees every local file first and claims the ones that are its own.
Parameters
fncallablerequiredfn(path, context) -> dict | None. context is
{"open": <the open sample, or None>, "target": <the drop zone>}.
Return None for anything that is not this plugin's (cheaply: it
is asked about every dropped file), or
\{"kind", "label", "detail"?, "action": \{"kind", "status", "reason"?, "message"\}\}. status is "auto", "needs_confirm"
or "blocked"; the action's kind names an executor this
plugin's own JS registers with PlexoraDropRouter.registerExecutor.
Returns
NoneNone