Merge pull request #5606 from owncloud/files-uploaderrorparsingfix

Added fix to correctly parse non-array error messages
This commit is contained in:
Thomas Müller 2013-10-29 09:23:19 -07:00
commit 2534c3bc78

View file

@ -335,7 +335,12 @@ $(document).ready(function() {
delete data.jqXHR;
if (typeof result[0] === 'undefined') {
if (result.status === 'error' && result.data && result.data.message){
data.textStatus = 'servererror';
data.errorThrown = result.data.message;
var fu = $(this).data('blueimp-fileupload') || $(this).data('fileupload');
fu._trigger('fail', e, data);
} else if (typeof result[0] === 'undefined') {
data.textStatus = 'servererror';
data.errorThrown = t('files', 'Could not get result from server.');
var fu = $(this).data('blueimp-fileupload') || $(this).data('fileupload');