Skip to content

Commit 3b9e4af

Browse files
authored
Merge pull request #6 from kono0514/master
allow passing glob options
2 parents 352c180 + 35b1c82 commit 3b9e4af

File tree

4 files changed

+11488
-2
lines changed

4 files changed

+11488
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Options:
4141
-C, --concurrency The amount of simultaneous uploads, increase on faster internet connection.
4242
[number] [default: 100]
4343
-g, --glob A glob on filename level to filter the files to upload [string] [default: "*.*"]
44+
--go, --glob-options Options to pass to the glob module [string] [default: "undefined]
4445
-a, --cache-control Cache control for uploaded files, can be string for single value or list of glob settings
4546
[string] [default: ""]
4647
-acl, --access-control-level Sets the access control level for uploaded files
@@ -53,6 +54,7 @@ Examples:
5354
cli.js ... -a "max-age=300" Set cache-control for all files
5455
cli.js ... -a '{ "**/*.json": "max-age=300", "**/*.*": Upload files from a local folder to a s3 bucket path
5556
"max-age=3600" }'
57+
cli.js ... -g "*" --go.nodir true --go.dot true Upload files from a local folder (including files with or without extension and .dot files)
5658
cli.js -d ... Dry run upload
5759
5860
for more information about AWS authentication, please visit
@@ -70,6 +72,7 @@ const files = await new Uploader({
7072
localPath: './files',
7173
remotePath: 'remote/path/in/bucket',
7274
glob: '*.jpg', // default is '*.*'
75+
globOptions: { nodir: true, dot: true }, // optional, additional options to pass to "glob" module
7376
concurrency: '200', // default is 100
7477
dryRun: true, // default is false
7578
cacheControl: 'max-age=300', // can be a string, for all uploade resources

0 commit comments

Comments
 (0)