Merge pull request #25569 from nextcloud/JakubOnderka-patch-1

file-upload: Correctly handle error responses for HTTP2
This commit is contained in:
Christoph Wurst 2021-03-11 13:54:55 +01:00 committed by GitHub
commit 95cddb84e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ OC.FileUpload.prototype = {
*/
getResponse: function() {
var response = this.data.response();
if (response.errorThrown) {
if (response.errorThrown || response.textStatus === 'error') {
// attempt parsing Sabre exception is available
var xml = response.jqXHR.responseXML;
if (xml && xml.documentElement.localName === 'error' && xml.documentElement.namespaceURI === 'DAV:') {