diff --git a/docs/cli/built-in-commands/sync-upload-directory.md b/docs/cli/built-in-commands/sync-upload-directory.md new file mode 100644 index 000000000..9649a3c3e --- /dev/null +++ b/docs/cli/built-in-commands/sync-upload-directory.md @@ -0,0 +1,19 @@ +# `sync:upload-directory` + +This command synchronizes the file records in the database with the files stored in a given upload directory. This functionality is also available through the [File Manager](control-panel/file-manager/synchronizing.md). + +## Options list: + +``` + --upload-id= + -u + Upload Directory ID. If not provided, list of Upload Directories with corresponding IDs will be shown to choose from + + --manipulations= + -m + Image manipulations to regenerate. Comma separated list of manipulation IDs. Use 'all' to regenerate all manipulations. If not provided, a list of available manipulations with corresponding IDs will be shown to choose from +``` + +## Example: + +`php eecli.php sync:upload-directory --upload-id=6 --manipulations=all` \ No newline at end of file diff --git a/docs/cli/intro.md b/docs/cli/intro.md index bc520e5e0..a4bcb1d93 100644 --- a/docs/cli/intro.md +++ b/docs/cli/intro.md @@ -30,6 +30,7 @@ By default the CLI is located `system/ee/eecli.php` . - Sync - [sync:conditional-fields - Sync channel entry conditional logic](cli/built-in-commands/sync-conditional-fields.md) - [sync:reindex - Sync content used in search indexes](cli/built-in-commands/sync-reindex.md) + - [sync:upload-directory - Sync files in an upload directory](cli/built-in-commands/sync-upload-directory.md) - [Update ExpressionEngine](cli/built-in-commands/update.md) - [Creating a Command](cli/creating-a-command.md) - [Defining Input](cli/defining-input.md) diff --git a/docs/control-panel/file-manager/synchronizing.md b/docs/control-panel/file-manager/synchronizing.md index 5eb7f005f..3ee4ca578 100644 --- a/docs/control-panel/file-manager/synchronizing.md +++ b/docs/control-panel/file-manager/synchronizing.md @@ -22,4 +22,6 @@ When submitted, all allowed file types in the directory will be checked against If an image manipulation is missing, it will be generated automatically. However, if you want to regenerate and replace all given manipulations, you can do so by checking the checkbox next to the manipulation name. -Lastly, any records in the database that do not have a corresponding file in the main directory will be highlighted as not found. \ No newline at end of file +Lastly, any records in the database that do not have a corresponding file in the main directory will be highlighted as not found. + +NOTE: This functionality is also available as a [CLI command](cli/built-in-commands/sync-upload-directory.md)