Closed cjbarnaby closed 4 years ago
Hi - thanks for this. I would prefer to use a different option, since identifying a key within a parameter called "bucket" is a bit roundabout, as is then magically adding .zip; perhaps we could do this with a --use-s3-key
that would set the whole key (including the extension), so if a user wants it uploaded to a specific key then can set the whole thing.
Thanks for the feedback, Gojko. I've create a new option --s3-key
for both create
and update
, updated the tests I'd made before and added some config validation tests (so that --s3-key
can only be used in conjunction with --use-s3-bucket
).
this is now on npm, as @5.12.0. thanks!
…eate and update commands
Hi there!
This is for allowing users to specify an S3 key (path and file name) in conjunction with the
--use-s3-bucket
option for both thecreate
andupdate
commands (inspired by this old conversation in Gitter). Is backwards compatible with current implementation of--use-s3-bucket
.If the parameter provided for that option includes a
/
character, the string following that character will be treated as the path for the uploaded file. The string after the final/
character in the parameter provided will be treated as the key for the file itself. The file extension (.zip
) is automatically appended to the key.Examples:
--use-s3-bucket claudia-uploads
uploadToS3
function)uploadToS3
function)--use-s3-bucket claudia-uploads/some-file
--use-s3-bucket claudia-uploads/some/path/some-file
New tests added to
spec/create-spec.js
andspec/update-spec.js
.Thanks!