diff options
author | Corey Hulen <corey@hulen.com> | 2015-07-27 10:53:02 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-07-27 10:53:02 -0800 |
commit | 81e55eb57c367a1403f693712411c0781287ea55 (patch) | |
tree | d26e8d55ed02e66680cc126fadbfdafe3caad918 /web/react/components/user_settings.jsx | |
parent | 85ff151b71a5b0a488b7a8c3f0978b5d0ee8e280 (diff) | |
parent | ebddb6c6b05d251f1e87b918eaec59ab09cd97a1 (diff) | |
download | chat-81e55eb57c367a1403f693712411c0781287ea55.tar.gz chat-81e55eb57c367a1403f693712411c0781287ea55.tar.bz2 chat-81e55eb57c367a1403f693712411c0781287ea55.zip |
Merge pull request #245 from nickago/MM-1662
MM-1662 Added support for png profile pictures
Diffstat (limited to 'web/react/components/user_settings.jsx')
-rw-r--r-- | web/react/components/user_settings.jsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/web/react/components/user_settings.jsx b/web/react/components/user_settings.jsx index b940a3c6f..2ac9a2371 100644 --- a/web/react/components/user_settings.jsx +++ b/web/react/components/user_settings.jsx @@ -721,13 +721,15 @@ var GeneralTab = React.createClass({ if(!this.submitActive) return; - if(this.state.picture.type !== "image/jpeg") { - this.setState({client_error: "Only JPG images may be used for profile pictures"}); + var picture = this.state.picture; + + if(picture.type !== "image/jpeg" && picture.type !== "image/png") { + this.setState({client_error: "Only JPG or PNG images may be used for profile pictures"}); return; } formData = new FormData(); - formData.append('image', this.state.picture, this.state.picture.name); + formData.append('image', picture, picture.name); client.uploadProfileImage(formData, function(data) { |