core.bones.fileBone
¶
Module Contents¶
Classes¶
Functions¶
|
Ensure that pending thumbnails or other derived Files are build |
- core.bones.fileBone.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.fileBone.fileBone(format="value['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)¶