Merge pull request #245 from nickago/MM-1662

MM-1662 Added support for png profile pictures
Этот коммит содержится в:
Corey Hulen
2015-07-27 10:53:02 -08:00
родитель 85ff151b71 ebddb6c6b0
Коммит 81e55eb57c

Просмотреть файл

@@ -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) {