Skip to content

Commit

Permalink
MIME-Type guessing is now on by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mludvig committed Jan 5, 2012
1 parent 2933252 commit 0d477b9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NEWS
Expand Up @@ -5,7 +5,7 @@ s3cmd 1.1.0 - ???
* Added "Static WebSite" support [ws-create / ws-delete / ws-info]
(contributed by Jens Braeuer)
* Force MIME type with --mime-type=abc/xyz, also --guess-mime-type
is no longer on by default.
is now on by default, -M is no longer shorthand for --guess-mime-type
* Allow parameters in MIME types, for example:
--mime-type="text/plain; charset=utf-8"
* Support for environment variables as config values. For instance
Expand Down
2 changes: 1 addition & 1 deletion S3/Config.py
Expand Up @@ -61,7 +61,7 @@ class Config(object):
use_https = False
bucket_location = "US"
default_mime_type = "binary/octet-stream"
guess_mime_type = False
guess_mime_type = True
mime_type = ""
# List of checks to be performed for 'sync'
sync_checks = ['size', 'md5'] # 'weak-timestamp'
Expand Down
2 changes: 1 addition & 1 deletion s3cmd
Expand Up @@ -1517,7 +1517,7 @@ def main():
optparser.add_option( "--no-access-logging", dest="log_target_prefix", action="store_false", help="Disable access logging (for [cfmodify] and [accesslog] commands)")

optparser.add_option( "--default-mime-type", dest="default_mime_type", action="store_true", help="Default MIME-type for stored objects. Application default is binary/octet-stream.")
optparser.add_option("-M", "--guess-mime-type", dest="guess_mime_type", action="store_true", help="Guess MIME-type of files by their extension. Fall back to default MIME-Type as specified by --default-mime-type option")
optparser.add_option( "--guess-mime-type", dest="guess_mime_type", action="store_true", help="Guess MIME-type of files by their extension or mime magic. Fall back to default MIME-Type as specified by --default-mime-type option")
optparser.add_option( "--no-guess-mime-type", dest="guess_mime_type", action="store_false", help="Don't guess MIME-type and use the default type instead.")
optparser.add_option("-m", "--mime-type", dest="mime_type", type="mimetype", metavar="MIME/TYPE", help="Force MIME-type. Override both --default-mime-type and --guess-mime-type.")

Expand Down

0 comments on commit 0d477b9

Please sign in to comment.