fix(cli): read-only and sidecar support for import (#3372)

* added flag to support toggling read-only mode (read-only true by default), added sidecarPath to import request payload

* removed default on --no-read-only to prevent confusion since true is the default
This commit is contained in:
Alex Phillips 2023-07-22 22:11:00 -04:00 committed by GitHub
parent 8f08100a30
commit c40aa4399b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View file

@ -35,9 +35,11 @@ program
.default(false),
)
.addOption(new Option('-i, --ignore [paths...]', 'Paths to ignore').env('IMMICH_IGNORE_PATHS').default(false))
.addOption(new Option('--no-read-only', 'Import files without read-only protection, allowing Immich to manage them'))
.argument('[paths...]', 'One or more paths to assets to be uploaded')
.action((paths, options) => {
options.import = true;
options.excludePatterns = options.ignore;
new Upload().run(paths, options);
});