.. include:: /Includes.rst.txt .. _cobj-file: FILE ^^^^ .. important:: This object was deprecated in TYPO3 9 LTS and will be removed in TYPO3 v10. See `Deprecation: #85970 - FILE content object `__ in the ChangeLog. This object returns the content of the file specified in the property "file". It is defined as PHP function fileResource() in typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php. **Note:** Do not mix this up with the cObject :ref:`FILES `; both are different cObjects. .. ### BEGIN~OF~TABLE ### .. container:: table-row Property file Data type :ref:`resource ` /:ref:`stdWrap ` Description The file whose content should be returned. If the resource is **jpg, jpeg, gif or png** the image is inserted as an image-tag. All other formats are read and inserted into the HTML code. The maximum filesize of documents to be read is set to 1024 KB internally! .. container:: table-row Property linkWrap Data type :ref:`linkWrap ` /:ref:`stdWrap ` Description (Executed before ".wrap" and ".stdWrap".) .. container:: table-row Property wrap Data type :ref:`wrap ` /:ref:`stdWrap ` Description (Executed after ".linkWrap" and before ".stdWrap".) .. container:: table-row Property stdWrap Data type :ref:`->stdWrap ` Description (Executed after ".linkWrap" and ".wrap".) .. container:: table-row Property altText titleText Data type string /:ref:`stdWrap ` Description **For output only!** If no alttext is specified, it will use an empty alttext. .. container:: table-row Property emptyTitleHandling Data type string /:ref:`stdWrap ` Description Value can be "keepEmpty" to preserve an empty title attribute, or "useAlt" to use the alt attribute instead. Default useAlt .. container:: table-row Property longdescURL Data type string /:ref:`stdWrap ` Description **For output only!** "longdesc" attribute (URL pointing to document with extensive details about image). .. ###### END~OF~TABLE ###### [tsref:(cObject).FILE] .. _cobj-file-examples: Example: """""""" In this example a page is defined, but the content between the body- tags comes directly from the file "gs.html":: page = PAGE page.typeNum = 0 page.10 = FILE page.10.file = fileadmin/gs/gs.html