Mime type

  • Hi all,

    I just downloaded s3cmd0.9.5. It is very nice, but I found that the -m <mime-type> option don't work! Am I missing something.

    Anyway, I solved it by by adding a line:

            default_mime_type = ""

    in S3/Config.py, then adding:

            if options.default_mime_type:
                    cfg.update_option("default_mime_type", getattr(options, "default_mime_type"))

    And, the last thing, in the function cmd_object_put there is a line:

                    extraheaders = {}

    I changed it to be:

                    extra_headers = {"content-type", cfg.default_mime_type}

    ...and now it works ;)


    • Michal Ludvig
      Michal Ludvig

      Hi, thanks for the report. It's now fixed in SVN and will be released in s3cmd 0.9.6