From 2a8fae5b221d3f33aa7cf025edc7eada25840268 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 6 Dec 2021 19:15:03 -0800 Subject: [PATCH] Documentation for put-object --content-type, refs #43 --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 2404566..a14c775 100644 --- a/README.md +++ b/README.md @@ -364,6 +364,11 @@ Use `-` as the file name to upload from standard input: This command shows a progress bar by default. Use `-s` or `--silent` to hide the progress bar. +The `Content-Type` on the uploaded object will be automatically set based on the file extension. If you are using standard input, or you want to over-ride the detected type, you can do so using the `--content-type` option: + + echo "

Hello World

" | \ + s3-credentials put-object my-bucket hello.html - --content-type "text/html" + ### get-object To download a file from a bucket use `s3-credentials get-object`: