Skip to content

Commit 7e2e3e6

Browse files
committed
minor symfony#10512 Mentioned the new file upload exception classes (javiereguiluz)
This PR was squashed before being merged into the 4.1 branch (closes symfony#10512). Discussion ---------- Mentioned the new file upload exception classes Fixes symfony#9642. Commits ------- 1ea6d88 Mentioned the new file upload exception classes
2 parents ec2ff2e + 1ea6d88 commit 7e2e3e6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

controller/upload_file.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,21 @@ logic to a separate service::
255255
}
256256
}
257257

258+
.. tip::
259+
260+
In addition to the generic :class:`Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException`
261+
class there are other exception classes to handle failed file uploads:
262+
:class:`Symfony\\Component\\HttpFoundation\\File\\Exception\\CannotWriteFileException`,
263+
:class:`Symfony\\Component\\HttpFoundation\\File\\Exception\\ExtensionFileException`,
264+
:class:`Symfony\\Component\\HttpFoundation\\File\\Exception\\FormSizeFileException`,
265+
:class:`Symfony\\Component\\HttpFoundation\\File\\Exception\\IniSizeFileException`,
266+
:class:`Symfony\\Component\\HttpFoundation\\File\\Exception\\NoFileException`,
267+
:class:`Symfony\\Component\\HttpFoundation\\File\\Exception\\NoTmpDirFileException`,
268+
and :class:`Symfony\\Component\\HttpFoundation\\File\\Exception\\PartialFileException`.
269+
270+
.. versionadded:: 4.1
271+
The detailed exception classes were introduced in Symfony 4.1.
272+
258273
Then, define a service for this class:
259274

260275
.. configuration-block::

0 commit comments

Comments
 (0)