Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 4429be3

Browse files
committed
Merge pull request #263 from metalinspired/patch-1
Use correct mime type for jpeg files
2 parents 470d07f + a43cda1 commit 4429be3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/book/validators/file/mime-type.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This validator is inversely related to the
2020
The following set of options are supported:
2121

2222
- `mimeType`: Comma-delimited string of MIME types, or array of MIME types,
23-
against which to test. Types can be specific (e.g., `image/jpg`), or refer
23+
against which to test. Types can be specific (e.g., `image/jpeg`), or refer
2424
only to the group (e.g., `image`).
2525
- `magicFile`: Location of the magicfile to use for MIME type comparisons;
2626
defaults to the value of the `MAGIC` constant.
@@ -34,23 +34,23 @@ The following set of options are supported:
3434
use Zend\Validator\File\MimeType;
3535

3636
// Only allow 'gif' or 'jpg' files
37-
$validator = new MimeType('image/gif,image/jpg');
37+
$validator = new MimeType('image/gif,image/jpeg');
3838

3939
// ... or with array notation:
40-
$validator = new MimeType(['image/gif', 'image/jpg']);
40+
$validator = new MimeType(['image/gif', 'image/jpeg']);
4141

4242
// ... or restrict to entire group of types:
4343
$validator = new MimeType(['image', 'audio']);
4444

4545
// Specify a different magicFile:
4646
$validator = new MimeType([
47-
'mimeType' => ['image/gif', 'image/jpg'],
47+
'mimeType' => ['image/gif', 'image/jpeg'],
4848
'magicFile' => '/path/to/magicfile.mgx',
4949
]);
5050

5151
// Enable HTTP header scanning (do not do this!):
5252
$validator = new MimeType([
53-
'mimeType' => ['image/gif', 'image/jpg'],
53+
'mimeType' => ['image/gif', 'image/jpeg'],
5454
'enableHeaderCheck' => true,
5555
]);
5656

0 commit comments

Comments
 (0)