Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

lino.utils.media

Defines the MediaFile class.

Classes

MediaFile(editable, *parts)

Represents a file on the server below MEDIA_ROOT with two properties path and url.

TmpMediaFile(ar, fmt)

class lino.utils.media.MediaFile(editable, *parts)

Bases: object

Represents a file on the server below MEDIA_ROOT with two properties path and url.

It takes into consideration the settings webdav_root, webdav_protocol and webdav_url.

path

A pathlib.Path naming the file on the server’s file system.

url

The URL to use for getting this file from a web client.

Used by lino.modlib.jinja.XMLMaker.get_xml_file(), lino.core.tables.AbstractTable.export_excel and others.