Menu

Mime type

2008-02-02
2013-02-19
  • Nobody/Anonymous

    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 ;)

    TK

     
    • Michal Ludvig

      Michal Ludvig - 2008-02-11

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

       

Log in to post a comment.