org.models.legacy_file ====================== .. py:module:: org.models.legacy_file .. autoapi-nested-parse:: Contains the legacy models of files for url redirect support. Going forward, onegov.file and onegov.org.models.file is used. Classes ------- .. autoapisummary:: org.models.legacy_file.LegacyFileCollection org.models.legacy_file.LegacyImageCollection org.models.legacy_file.LegacyFile org.models.legacy_file.LegacyImage Module Contents --------------- .. py:class:: LegacyFileCollection(app: onegov.org.app.OrgApp) .. py:attribute:: path_prefix :value: 'files/' .. py:attribute:: file_storage .. py:method:: get_file_by_filename(filename: str) -> LegacyFile | None .. py:class:: LegacyImageCollection(app: onegov.org.app.OrgApp) .. py:attribute:: path_prefix :value: 'images/' .. py:attribute:: file_storage .. py:method:: get_file_by_filename(filename: str) -> LegacyImage | None .. py:class:: LegacyFile(filename: str, info: dict[str, Any] | None = None) Bases: :py:obj:`onegov.core.filestorage.FilestorageFile` A filestorage file that points to an uploaded image or file. .. py:attribute:: filename .. py:attribute:: info .. py:property:: date :type: datetime.date | None .. py:property:: path :type: str .. py:property:: original_name :type: bytes | None .. py:method:: from_url(url: str) -> Self :classmethod: .. py:class:: LegacyImage(filename: str, info: dict[str, Any] | None = None) Bases: :py:obj:`LegacyFile` A filestorage file that points to a full image (not a thumbnail). .. py:property:: path :type: str