diff options
author | Asaad Mahmood <Unknowngi@live.com> | 2015-07-28 01:07:16 +0500 |
---|---|---|
committer | Asaad Mahmood <Unknowngi@live.com> | 2015-07-28 01:07:16 +0500 |
commit | 3dd541d3e09b99c60b892c37419dfa30b10700c7 (patch) | |
tree | 2eac6095f6465d2e00846ad9479daedd0609dc5e /web/react/components/user_settings.jsx | |
parent | 5b7ae4f864266e25f75c440aef9bbab9c46b1ecf (diff) | |
parent | 62db88ed456148750cd6990ffc02e660af53ef91 (diff) | |
download | chat-3dd541d3e09b99c60b892c37419dfa30b10700c7.tar.gz chat-3dd541d3e09b99c60b892c37419dfa30b10700c7.tar.bz2 chat-3dd541d3e09b99c60b892c37419dfa30b10700c7.zip |
Merge branch 'master' of https://github.com/mattermost/platform
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) { |