added error message if attachments are not allowed

This commit is contained in:
Jeena Paradies 2012-12-28 12:44:56 +01:00
parent e5704ddda7
commit 80728df815
3 changed files with 21 additions and 4 deletions

View file

@ -533,7 +533,15 @@ function(jQuery, Paths, URI, HostApp, Cache) {
post += blob_string;
post += "\r\n--" + boundary + "--\r\n";
Paths.postMultipart(url.toString(), callback, post, boundary);
var newCallback = function(resp) {
if (resp.status == 403) {
var err = JSON.parse(resp.responseText);
HostApp.alertTitleWithMessage(resp.statusText, err.error);
}
callback(resp);
}
Paths.postMultipart(url.toString(), newCallback, post, boundary);
}
Core.prototype.remove = function(id, callback) {