Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always attempt to set the content-type #406

Merged
merged 1 commit into from
Dec 8, 2014
Merged

Conversation

gf3
Copy link
Contributor

@gf3 gf3 commented Oct 27, 2014

Fixes #401

@jdjkelly
Copy link

+1 this is critical

@pifantastic
Copy link

+1

6 similar comments
@miketaylr
Copy link

👍

@connerfritz
Copy link

+1

@rickycodes
Copy link

👍

@adammeghji
Copy link

+1

@edude03
Copy link

edude03 commented Nov 17, 2014

+1

@mlatham
Copy link

mlatham commented Nov 17, 2014

+1

@kieran
Copy link

kieran commented Nov 17, 2014

pls

@niamu
Copy link

niamu commented Nov 24, 2014

+1

@miketaylr
Copy link

Actually I change my mind. -9.

BACK TO SQUARE ONE.

mdomsch added a commit to mdomsch/s3cmd that referenced this pull request Dec 1, 2014
Addresses issues s3tools#214, s3tools#409, and incorporates pull request s3tools#406.

content_type() was trying to do too many things in line, making it
hard to read.  Split the part that gets the mime-type via reading a
file into a helper function.  This lets the command-line-provided
--mime-type override file-detected methods.

Raise ParameterError if file is stdin and no --mime-type or
--default-mime-type has been provided.

Split object_replace() out from object_copy().  Yes, they are
similar.  No, they're not identical.  This lets us change the MIME
type of a file via 's3cmd modify'.

Add test cases to change the MIME type via 's3cmd modify'.
@mdomsch
Copy link
Contributor

mdomsch commented Dec 1, 2014

Please try with mdomsch tree, branch bug/content-type. Remember to use --acl-public (if that's what you want), otherwise on modify, the ACLs get reset back to default.

@mdomsch
Copy link
Contributor

mdomsch commented Dec 1, 2014

Subsumed into Pull Request #428

@mdomsch mdomsch merged commit b0efbac into s3tools:master Dec 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting the Mime-Type Does Not Work