core.bones.image ================ .. py:module:: core.bones.image Classes ------- .. autoapisummary:: core.bones.image.ImageBoneRelSkel core.bones.image.ImageBone Module Contents --------------- .. py:class:: ImageBoneRelSkel Bases: :py:obj:`core.skeleton.relskel.RelSkel` This is a Skeleton-like class that acts as a container for Skeletons used as a additional information data skeleton for :class:`~viur.core.bones.relational.RelationalBone`. It needs to be sub-classed where information about the kindName and its attributes (bones) are specified. The Skeleton stores its bones in an :class:`OrderedDict`-Instance, so the definition order of the contained bones remains constant. .. py:attribute:: alt .. py:class:: ImageBone(*, public = True, using = ImageBoneRelSkel, validMimeTypes = ['image/*'], **kwargs) Bases: :py:obj:`core.bones.file.FileBone` A FileBone is a custom bone class that inherits from the TreeLeafBone class, and is used to store and manage file references in a ViUR application. :param format: Hint for the UI how to display a file entry (defaults to it's filename) :param maxFileSize: The maximum filesize accepted by this bone in bytes. None means no limit. This will always be checked against the original file uploaded - not any of it's derivatives. :param derive: A set of functions used to derive other files from the referenced ones. Used fe. to create thumbnails / images for srcmaps from hires uploads. If set, must be a dictionary from string (a key from conf.file_derivations) to the parameters passed to that function. The parameters can be any type (including None) that can be json-serialized. .. code-block:: python # Example derive = { "thumbnail": [{"width": 111}, {"width": 555, "height": 666}]} :param validMimeTypes: A list of Mimetypes that can be selected in this bone (or None for any) Wildcards ("image\/*") are supported. .. code-block:: python # Example validMimeTypes=["application/pdf", "image/*"] Initializes a new Filebone. All properties inherited by RelationalBone are supported. :param format: Hint for the UI how to display a file entry (defaults to it's filename) :param maxFileSize: The maximum filesize accepted by this bone in bytes. None means no limit. This will always be checked against the original file uploaded - not any of it's derivatives. :param derive: A set of functions used to derive other files from the referenced ones. Used to create thumbnails and images for srcmaps from hires uploads. If set, must be a dictionary from string (a key from) conf.file_derivations) to the parameters passed to that function. The parameters can be any type (including None) that can be json-serialized. .. code-block:: python # Example derive = {"thumbnail": [{"width": 111}, {"width": 555, "height": 666}]} :param validMimeTypes: A list of Mimetypes that can be selected in this bone (or None for any). Wildcards `('image\*')` are supported. .. code-block:: python #Example validMimeTypes=["application/pdf", "image/*"] .. py:attribute:: type :value: 'relational.tree.leaf.file.image' The type of this bone is 'relational.tree.leaf.file'.