Added support for png profile pictures
Этот коммит содержится в:
@@ -683,13 +683,15 @@ var GeneralTab = React.createClass({
|
|||||||
|
|
||||||
if(!this.submitActive) return;
|
if(!this.submitActive) return;
|
||||||
|
|
||||||
if(this.state.picture.type !== "image/jpeg") {
|
var picture = this.state.picture;
|
||||||
this.setState({client_error: "Only JPG images may be used for profile pictures"});
|
|
||||||
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
formData = new FormData();
|
formData = new FormData();
|
||||||
formData.append('image', this.state.picture, this.state.picture.name);
|
formData.append('image', picture, picture.name);
|
||||||
|
|
||||||
client.uploadProfileImage(formData,
|
client.uploadProfileImage(formData,
|
||||||
function(data) {
|
function(data) {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user