Send a new group logo to the server.

This commit is contained in:
Pierre HUBERT
2018-07-04 13:27:07 +02:00
parent 6239d43f05
commit eb69734a38
3 changed files with 233 additions and 137 deletions

View File

@ -82,4 +82,19 @@ ComunicWeb.components.groups.interface = {
ComunicWeb.common.api.makeAPIrequest(apiURI, settings, true, callback);
},
/**
* Upload a new group logo
*
* @param {Number} id The ID of the target group
* @param {FormData} data The form data that contains the
* new logo (parameter name : logo)
* @param {Function} callback
*/
uploadLogo: function(id, data, callback){
//Perform the request over the API
var apiURI = "groups/upload_logo";
data.append("id", id);
ComunicWeb.common.api.makeFormDatarequest(apiURI, data, true, callback);
}
};