Skip to content

Commit 7a3f76e

Browse files
committed
format lists in readme
1 parent 5785d07 commit 7a3f76e

File tree

1 file changed

+61
-61
lines changed

1 file changed

+61
-61
lines changed

README.markdown

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -444,89 +444,89 @@ The Upload plugin also comes with a `FileImport` behavior and a `FileGrabber` be
444444
## Behavior options:
445445

446446
* `pathMethod`: The method to use for file paths. This is appended to the `path` option below
447-
* Default: (string) `primaryKey`
448-
* Options:
449-
* flat: Does not create a path for each record. Files are moved to the value of the 'path' option.
450-
* primaryKey: Path based upon the record's primaryKey is generated. Persists across a record update.
451-
* random: Random path is generated for each file upload in the form `nn/nn/nn` where `nn` are random numbers. Does not persist across a record update.
452-
* randomCombined: Random path - with model id - is generated for each file upload in the form `ID/nn/nn/nn` where `ID` is the current model's ID and `nn` are random numbers. Does not persist across a record update.
447+
* Default: (string) `primaryKey`
448+
* Options:
449+
* `flat`: Does not create a path for each record. Files are moved to the value of the 'path' option.
450+
* `primaryKey`: Path based upon the record's primaryKey is generated. Persists across a record update.
451+
* `random`: Random path is generated for each file upload in the form `nn/nn/nn` where `nn` are random numbers. Does not persist across a record update.
452+
* `randomCombined`: Random path - with model id - is generated for each file upload in the form `ID/nn/nn/nn` where `ID` is the current model's ID and `nn` are random numbers. Does not persist across a record update.
453453
* `path`: A path relative to the `APP_PATH`. Should end in `{DS}`
454-
* Default: (string) `'{ROOT}webroot{DS}files{DS}{model}{DS}{field}{DS}'`
455-
* Tokens:
456-
* {ROOT}: Replaced by a `rootDir` option
457-
* {DS}: Replaced by a `DIRECTORY_SEPARATOR`
458-
* {model}: Replaced by the Model Alias.
459-
* {field}: Replaced by the field name.
460-
* {primaryKey}: Replaced by the record primary key, when available. If used on a new record being created, will have undefined behavior.
461-
* {size}: Replaced by a zero-length string (the empty string) when used for the regular file upload path. Only available for resized thumbnails.
462-
* {geometry}: Replaced by a zero-length string (the empty string) when used for the regular file upload path. Only available for resized thumbnails.
454+
* Default: (string) `'{ROOT}webroot{DS}files{DS}{model}{DS}{field}{DS}'`
455+
* Tokens:
456+
* {ROOT}: Replaced by a `rootDir` option
457+
* {DS}: Replaced by a `DIRECTORY_SEPARATOR`
458+
* {model}: Replaced by the Model Alias.
459+
* {field}: Replaced by the field name.
460+
* {primaryKey}: Replaced by the record primary key, when available. If used on a new record being created, will have undefined behavior.
461+
* {size}: Replaced by a zero-length string (the empty string) when used for the regular file upload path. Only available for resized thumbnails.
462+
* {geometry}: Replaced by a zero-length string (the empty string) when used for the regular file upload path. Only available for resized thumbnails.
463463
* `fields`: An array of fields to use when uploading files
464-
* Default: (array) `array('dir' => 'dir', 'type' => 'type', 'size' => 'size')`
465-
* Options:
466-
* dir: Field to use for storing the directory
467-
* type: Field to use for storing the filetype
468-
* size: Field to use for storing the filesize
464+
* Default: (array) `array('dir' => 'dir', 'type' => 'type', 'size' => 'size')`
465+
* Options:
466+
* dir: Field to use for storing the directory
467+
* type: Field to use for storing the filetype
468+
* size: Field to use for storing the filesize
469469
* `rootDir`: Root directory for moving images. Auto-prepended to `path` and `thumbnailPath` where necessary
470-
* Default (string) `ROOT . DS . APP_DIR . DS`
470+
* Default (string) `ROOT . DS . APP_DIR . DS`
471471
* `mimetypes`: Array of mimetypes to use for validation
472-
* Default: (array) empty
472+
* Default: (array) empty
473473
* `extensions`: Array of extensions to use for validation
474-
* Default: (array) empty
474+
* Default: (array) empty
475475
* `maxSize`: Max filesize in bytes for validation
476-
* Default: (int) `2097152`
476+
* Default: (int) `2097152`
477477
* `minSize`: Minimum filesize in bytes for validation
478-
* Default: (int) `8`
478+
* Default: (int) `8`
479479
* `maxHeight`: Maximum image height for validation
480-
* Default: (int) `0`
480+
* Default: (int) `0`
481481
* `minHeight`: Minimum image height for validation
482-
* Default: (int) `0`
482+
* Default: (int) `0`
483483
* `maxWidth`: Maximum image width for validation
484-
* Default: (int) `0`
484+
* Default: (int) `0`
485485
* `minWidth`: Minimum image width for validation
486-
* Default: (int) `0`
486+
* Default: (int) `0`
487487
* `deleteOnUpdate`: Whether to delete files when uploading new versions (potentially dangerous due to naming conflicts)
488-
* Default: (boolean) `false`
488+
* Default: (boolean) `false`
489489
* `thumbnails`: Whether to create thumbnails or not
490-
* Default: (boolean) `true`
490+
* Default: (boolean) `true`
491491
* `thumbnailMethod`: The method to use for resizing thumbnails
492-
* Default: (string) `imagick`
493-
* Options:
494-
* imagick: Uses the PHP `imagick` extension to generate thumbnails
495-
* php: Uses the built-in PHP methods (`GD` extension) to generate thumbnails. Does not support BMP images.
492+
* Default: (string) `imagick`
493+
* Options:
494+
* imagick: Uses the PHP `imagick` extension to generate thumbnails
495+
* php: Uses the built-in PHP methods (`GD` extension) to generate thumbnails. Does not support BMP images.
496496
* `thumbnailName`: Naming style for a thumbnail
497-
* Default: `NULL`
498-
* Note: The tokens `{size}` and `{filename}` are both valid for naming and will be auto-replaced with the actual terms.
499-
* Note: As well, the extension of the file will be automatically added.
500-
* Note: When left unspecified, will be set to `{size}_{filename}` or `{filename}_{size}` depending upon the value of `thumbnailPrefixStyle`
497+
* Default: `NULL`
498+
* Note: The tokens `{size}` and `{filename}` are both valid for naming and will be auto-replaced with the actual terms.
499+
* Note: As well, the extension of the file will be automatically added.
500+
* Note: When left unspecified, will be set to `{size}_{filename}` or `{filename}_{size}` depending upon the value of `thumbnailPrefixStyle`
501501
* `thumbnailPath`: A path relative to the `rootDir` where thumbnails will be saved. Should end in `{DS}`. If not set, thumbnails will be saved at `path`.
502-
* Default: `NULL`
503-
* Tokens:
504-
* {ROOT}: Replaced by a `rootDir` option
505-
* {DS}: Replaced by a `DIRECTORY_SEPARATOR`
506-
* {model}: Replaced by the Model Alias
507-
* {field}: Replaced by the field name
508-
* {size}: Replaced by the size key specified by a given `thumbnailSize`
509-
* {geometry}: Replaced by the geometry value specified by a given `thumbnailSize`
502+
* Default: `NULL`
503+
* Tokens:
504+
* {ROOT}: Replaced by a `rootDir` option
505+
* {DS}: Replaced by a `DIRECTORY_SEPARATOR`
506+
* {model}: Replaced by the Model Alias
507+
* {field}: Replaced by the field name
508+
* {size}: Replaced by the size key specified by a given `thumbnailSize`
509+
* {geometry}: Replaced by the geometry value specified by a given `thumbnailSize`
510510
* `thumbnailPrefixStyle`: Whether to prefix or suffix the style onto thumbnails
511-
* Default: (boolean) `true` prefix the thumbnail
512-
* Note that this overrides `thumbnailName` when `thumbnailName` is not specified in your config
511+
* Default: (boolean) `true` prefix the thumbnail
512+
* Note that this overrides `thumbnailName` when `thumbnailName` is not specified in your config
513513
* `thumbnailQuality`: Quality of thumbnails that will be generated, on a scale of 0-100. Not supported gif images when using GD for image manipulation.
514-
* Default: (int) `75`
514+
* Default: (int) `75`
515515
* `thumbnailSizes`: Array of thumbnail sizes, with the size-name mapping to a geometry
516-
* Default: (array) empty
517-
* `thumbnailType`: Override the type of the generated thumbnail
518-
* Default: (mixed) `false` or `png` when the upload is a Media file
519-
* Options:
520-
* Any valid image type
516+
* Default: (array) empty
517+
* `thumbnailType`: Override the type of the generated thumbnail
518+
* Default: (mixed) `false` or `png` when the upload is a Media file
519+
* Options:
520+
* Any valid image type
521521
* `mediaThumbnailType`: Override the type of the generated thumbnail for a non-image media (`pdfs`). Overrides `thumbnailType`
522-
* Default: (mixed) `png`
523-
* Options:
524-
* Any valid image type
522+
* Default: (mixed) `png`
523+
* Options:
524+
* Any valid image type
525525
* `saveDir`: Can be used to turn off saving the directory
526-
* Default: (boolean) `true`
527-
* Note: Because of the way in which the directory is saved, if you are using a `pathMethod` other than flat and you set `saveDir` to false, you may end up in situations where the file is in a location that you cannot predict. This is more of an issue for a `pathMethod` of `random` and `randomCombined` than `primaryKey`, but keep this in mind when fiddling with this option
526+
* Default: (boolean) `true`
527+
* Note: Because of the way in which the directory is saved, if you are using a `pathMethod` other than flat and you set `saveDir` to false, you may end up in situations where the file is in a location that you cannot predict. This is more of an issue for a `pathMethod` of `random` and `randomCombined` than `primaryKey`, but keep this in mind when fiddling with this option
528528
* `mode`: The UNIX permissions to set on the created upload directories.
529-
* Default: (integer) `0777`
529+
* Default: (integer) `0777`
530530

531531
## Thumbnail Sizes and Styles
532532

0 commit comments

Comments
 (0)