File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -35,12 +35,13 @@ You can also point it to another config file with e.g. `$ s3-cli --config /path/
35
35
36
36
### put
37
37
38
- Uploads a file to S3.
38
+ Uploads a file to S3. Assumes the target filename to be the same as the source filename (if none specified)
39
39
40
40
Example:
41
41
42
42
```
43
43
s3-cli put /path/to/file s3://bucket/key/on/s3
44
+ s3-cli put /path/to/source-file s3://bucket/target-file
44
45
```
45
46
46
47
Options:
@@ -53,6 +54,7 @@ Options:
53
54
* ` --add-header=NAME:VALUE ` - Add a given HTTP header to the upload request. Can be
54
55
used multiple times. For instance set 'Expires' or 'Cache-Control' headers
55
56
(or both) using this options if you like.
57
+ * ` --region=REGION-NAME ` - Specify the region (defaults to us-east-1)
56
58
57
59
### get
58
60
Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ function cmdPut() {
221
221
var source = args . _ [ 0 ] ;
222
222
var dest = args . _ [ 1 ] ;
223
223
var parts = parseS3Url ( dest ) ;
224
- if ( / \/ $ / . test ( parts . key ) ) {
224
+ if ( / \/ $ / . test ( parts . key ) || parts . key == '' ) {
225
225
parts . key += path . basename ( source ) ;
226
226
}
227
227
var acl = getAcl ( ) ;
You can’t perform that action at this time.
0 commit comments