Skip to content

Commit 1ea6d88

Browse files
committed
Mentioned the new file upload exception classes
1 parent 76a6c65 commit 1ea6d88

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

controller/upload_file.rst

+15
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)