@@ -212,6 +212,20 @@ maxSizeMessage
212
212
213
213
The message displayed if the file is larger than the `maxSize `_ option.
214
214
215
+ You can use the following parameters in this message:
216
+
217
+ +------------------+------------------------------------------------+
218
+ | Parameter | Description |
219
+ +==================+================================================+
220
+ | ``{{ size }} `` | File size of the given file |
221
+ +------------------+------------------------------------------------+
222
+ | ``{{ limit }} `` | Maximum file size allowed |
223
+ +------------------+------------------------------------------------+
224
+ | ``{{ suffix }} `` | Suffix for the used file size unit (see above) |
225
+ +------------------+------------------------------------------------+
226
+ | ``{{ file }} `` | Absolute file path |
227
+ +------------------+------------------------------------------------+
228
+
215
229
mimeTypesMessage
216
230
~~~~~~~~~~~~~~~~
217
231
@@ -220,6 +234,18 @@ mimeTypesMessage
220
234
The message displayed if the mime type of the file is not a valid mime type
221
235
per the `mimeTypes `_ option.
222
236
237
+ You can use the following parameters in this message:
238
+
239
+ +-----------------+----------------------------------------+
240
+ | Parameter | Description |
241
+ +=================+========================================+
242
+ | ``{{ type }} `` | The MIME type of the given file |
243
+ +-----------------+----------------------------------------+
244
+ | ``{{ types }} `` | The list of allowed MIME types |
245
+ +-----------------+----------------------------------------+
246
+ | ``{{ file }} `` | Absolute file path |
247
+ +-----------------+----------------------------------------+
248
+
223
249
disallowEmptyMessage
224
250
~~~~~~~~~~~~~~~~~~~~
225
251
@@ -228,6 +254,14 @@ disallowEmptyMessage
228
254
This constraint checks if the uploaded file is empty (i.e. 0 bytes). If it is,
229
255
this message is displayed.
230
256
257
+ You can use the following parameters in this message:
258
+
259
+ +----------------+--------------------+
260
+ | Parameter | Description |
261
+ +================+====================+
262
+ | ``{{ file }} `` | Absolute file path |
263
+ +----------------+--------------------+
264
+
231
265
notFoundMessage
232
266
~~~~~~~~~~~~~~~
233
267
@@ -237,6 +271,14 @@ The message displayed if no file can be found at the given path. This error
237
271
is only likely if the underlying value is a string path, as a ``File `` object
238
272
cannot be constructed with an invalid file path.
239
273
274
+ You can use the following parameters in this message:
275
+
276
+ +----------------+--------------------+
277
+ | Parameter | Description |
278
+ +================+====================+
279
+ | ``{{ file }} `` | Absolute file path |
280
+ +----------------+--------------------+
281
+
240
282
notReadableMessage
241
283
~~~~~~~~~~~~~~~~~~
242
284
@@ -245,6 +287,14 @@ notReadableMessage
245
287
The message displayed if the file exists, but the PHP ``is_readable() `` function
246
288
fails when passed the path to the file.
247
289
290
+ You can use the following parameters in this message:
291
+
292
+ +----------------+--------------------+
293
+ | Parameter | Description |
294
+ +================+====================+
295
+ | ``{{ file }} `` | Absolute file path |
296
+ +----------------+--------------------+
297
+
248
298
uploadIniSizeErrorMessage
249
299
~~~~~~~~~~~~~~~~~~~~~~~~~
250
300
@@ -253,6 +303,16 @@ uploadIniSizeErrorMessage
253
303
The message that is displayed if the uploaded file is larger than the ``upload_max_filesize ``
254
304
``php.ini `` setting.
255
305
306
+ You can use the following parameters in this message:
307
+
308
+ +------------------+------------------------------------------------+
309
+ | Parameter | Description |
310
+ +==================+================================================+
311
+ | ``{{ limit }} `` | Maximum file size allowed |
312
+ +------------------+------------------------------------------------+
313
+ | ``{{ suffix }} `` | Suffix for the used file size unit (see above) |
314
+ +------------------+------------------------------------------------+
315
+
256
316
uploadFormSizeErrorMessage
257
317
~~~~~~~~~~~~~~~~~~~~~~~~~~
258
318
@@ -261,14 +321,65 @@ uploadFormSizeErrorMessage
261
321
The message that is displayed if the uploaded file is larger than allowed
262
322
by the HTML file input field.
263
323
324
+ This message has no parameters.
325
+
326
+ uploadPartialErrorMessage
327
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
328
+
329
+ **type **: ``string `` **default **: ``The file was only partially uploaded. ``
330
+
331
+ The message that is displayed if the uploaded file is only partially uploaded.
332
+
333
+ This message has no parameters.
334
+
335
+ uploadNoFileErrorMessage
336
+ ~~~~~~~~~~~~~~~~~~~~~~~~
337
+
338
+ **type **: ``string `` **default **: ``No file was uploaded. ``
339
+
340
+ The message that is displayed if no file was uploaded.
341
+
342
+ This message has no parameters.
343
+
344
+ uploadNoTmpDirErrorMessage
345
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
346
+
347
+ **type **: ``string `` **default **: ``No temporary folder was configured in php.ini. ``
348
+
349
+ The message that is displayed if the php.ini setting ``upload_tmp_dir `` is
350
+ missing.
351
+
352
+ This message has no parameters.
353
+
354
+ uploadCantWriteErrorMessage
355
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
356
+
357
+ **type **: ``string `` **default **: ``Cannot write temporary file to disk. ``
358
+
359
+ The message that is displayed if the uploaded file can't be stored in the
360
+ temporary folder.
361
+
362
+ This message has no parameters.
363
+
364
+ uploadExtensionErrorMessage
365
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
366
+
367
+ **type **: ``string `` **default **: ``A PHP extension caused the upload to fail. ``
368
+
369
+ The message that is displayed if a PHP extension caused the file upload to
370
+ fail.
371
+
372
+ This message has no parameters.
373
+
264
374
uploadErrorMessage
265
375
~~~~~~~~~~~~~~~~~~
266
376
267
377
**type **: ``string `` **default **: ``The file could not be uploaded. ``
268
378
269
379
The message that is displayed if the uploaded file could not be uploaded
270
- for some unknown reason, such as the file upload failed or it couldn't be
271
- written to disk.
380
+ for some unknown reason.
381
+
382
+ This message has no parameters.
272
383
273
384
.. include :: /reference/constraints/_payload-option.rst.inc
274
385
0 commit comments