Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Once your files have been uploaded you can link to them using the ``HtmlHelper``
This example uses the `default behaviour configuration <configuration.md>`__ using the model ``Example``.

.. code:: php

<?php
$exampleData = [
'Example' => [
Expand All @@ -147,6 +148,7 @@ This example uses the `default behaviour configuration <configuration.md>`__ usi
If we have configured a thumbnail in our application. We can simply prefix our file with the name of that thumbnail.

.. code:: php

<?php
echo $this->Html->link('../files/example/image/' . $exampleData['Example']['dir'] . '/thumb_' . $exampleData['Example']['image']);
?>
Expand Down Expand Up @@ -268,4 +270,4 @@ Perhaps in a model callback such as ``beforeSave()``.
<?php
// app/Model/User.php
$this->Behaviors->Upload->settings['field']['path'] = $newPath;
?>
?>