core.bones.fileBone

Module Contents

Classes

fileBone

Functions

ensureDerived(key: viur.core.db.KeyClass, srcKey, deriveMap: Dict[(str, Any)])

Ensure that pending thumbnails or other derived Files are build

core.bones.fileBone.ensureDerived(key: viur.core.db.KeyClass, srcKey, deriveMap: Dict[str, Any])

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

class core.bones.fileBone.fileBone(format='$(dest.name)', derive: Union[None, Dict[str, Any]] = None, validMimeTypes: Union[None, List[str]] = None, maxFileSize: Union[None, int] = None, *args, **kwargs)

Bases: viur.core.bones.treeLeafBone

kind = file
type = relational.tree.leaf.file
refKeys = ['name', 'key', 'mimetype', 'dlkey', 'size', 'width', 'height', 'derived']
isInvalid(self, value)
postSavedHandler(self, skel, boneName, key)
getReferencedBlobs(self, skel, name)
refresh(self, skel, boneName)