Adds functionality for uploading files to the server and managing them. See uploads : Managing uploaded files.

(This module's source code is available here.)


Plugin(site, app_label, app_name, ...)

See Introduction to plugins.

class lino.modlib.uploads.Plugin(site, app_label, app_name, app_module, needed_by)

Bases: lino.core.plugin.Plugin

See Introduction to plugins.

max_file_size = 512000

Refuse to upload files that are larger than this (in bytes).

upload_to_tpl = 'uploads/%Y/%m'

The value to use as upload_to for the Upload.file field.

remove_orphaned_files = False

Whether checkdata --fix should automatically delete orphaned files in the uploads folder.