Skip to content

Commit 0874119

Browse files
authored
Merge pull request #802 from ExpressionEngine/feature/7.x/cli-sync-upload-dir
Document new sync:upload-directory CLI command
2 parents dddeafd + 519dbe5 commit 0874119

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# `sync:upload-directory`
2+
3+
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).
4+
5+
## Options list:
6+
7+
```
8+
--upload-id=<value>
9+
-u <value>
10+
Upload Directory ID. If not provided, list of Upload Directories with corresponding IDs will be shown to choose from
11+
12+
--manipulations=<value>
13+
-m <value>
14+
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
15+
```
16+
17+
## Example:
18+
19+
`php eecli.php sync:upload-directory --upload-id=6 --manipulations=all`

docs/cli/intro.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ By default the CLI is located `system/ee/eecli.php` .
3030
- Sync
3131
- [sync:conditional-fields - Sync channel entry conditional logic](cli/built-in-commands/sync-conditional-fields.md)
3232
- [sync:reindex - Sync content used in search indexes](cli/built-in-commands/sync-reindex.md)
33+
- [sync:upload-directory - Sync files in an upload directory](cli/built-in-commands/sync-upload-directory.md)
3334
- [Update ExpressionEngine](cli/built-in-commands/update.md)
3435
- [Creating a Command](cli/creating-a-command.md)
3536
- [Defining Input](cli/defining-input.md)

docs/control-panel/file-manager/synchronizing.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ When submitted, all allowed file types in the directory will be checked against
2222

2323
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.
2424

25-
Lastly, any records in the database that do not have a corresponding file in the main directory will be highlighted as not found.
25+
Lastly, any records in the database that do not have a corresponding file in the main directory will be highlighted as not found.
26+
27+
NOTE: This functionality is also available as a [CLI command](cli/built-in-commands/sync-upload-directory.md)

0 commit comments

Comments
 (0)