Can send a request to the server to upload an image

This commit is contained in:
Pierre
2018-05-01 08:59:14 +02:00
parent 612949a86a
commit e533d1e2f8
2 changed files with 65 additions and 0 deletions

View File

@ -95,5 +95,16 @@ ComunicWeb.components.settings.interface = {
var apiURI = "settings/get_account_image";
var params = {};
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
},
/**
* Upload a new account image
*
* @param {FormData} data The data containing information about the new account image
* @param {function} callback
*/
uploadAccountImage: function(data, callback){
var apiURI = "settings/upload_account_image";
ComunicWeb.common.api.makeFormDatarequest(apiURI, data, true, callback);
}
}