AbstractOS

Search documentation

Find a docs page

Developer guideFiles integration

File picker and previews

Open and save files through the portal and add Quick Preview support for your file type.

Sandboxed apps cannot read the file system directly. Use the file chooser portal; the user’s selection grants access to just that file.

python
dialog = ak.FileDialog(title="Open drawing")
dialog.set_filters([ak.FileFilter(name="Scriblr", mime_types=["application/x-scriblr"])])
file = await dialog.open(window)

Quick Preview

Register a thumbnailer in your manifest so Files can show previews of your documents:

app.toml
[[thumbnailer]]
mime_types = ["application/x-scriblr"]
exec = "scriblr-thumbnail %i %o %s"
Last updated Edit this page on GitLab