core.bones.file

Module Contents

Classes

FileBone

Functions

ensureDerived(key, srcKey, deriveMap[, refreshKey])

Ensure that pending thumbnails or other derived Files are build

core.bones.file.ensureDerived(key: viur.core.db.Key, srcKey, deriveMap: Dict[str, Any], refreshKey: viur.core.db.Key = None)

Ensure that pending thumbnails or other derived Files are build :param key: DB-Key of the file-object on which we should update the derivemap :param srcKey: Prefix for a (hopefully) stable key to prevent rebuilding derives over and over again :param deriveMap: List of DeriveDicts we should build/update :param refreshKey: If set, we’ll fetch and refresh the skeleton after building new derives

class core.bones.file.FileBone(*, derive: None | Dict[str, Any] = None, maxFileSize: None | int = None, validMimeTypes: None | List[str] = None, **kwargs)

Bases: viur.core.bones.treeleaf.TreeLeafBone

kind = 'file'
type = 'relational.tree.leaf.file'
refKeys = ['name', 'key', 'mimetype', 'dlkey', 'size', 'width', 'height', 'derived']
isInvalid(value)
postSavedHandler(skel, boneName, key)
getReferencedBlobs(skel: viur.core.skeleton.SkeletonInstance, name: str) Set[str]
refresh(skel, boneName)