Merge pull request #42767 from nextcloud/backport/42598/stable28

This commit is contained in:
John Molakvoæ 2024-01-18 13:57:25 +01:00 committed by GitHub
commit 1fc89782c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 7 deletions

View file

@ -541,9 +541,6 @@ export default defineComponent({
} else if (status === 403) {
showError(this.t('files', 'Operation is blocked by access control'))
return
} else if (status !== 0) {
showError(this.t('files', 'Error when assembling chunks, status code {status}', { status }))
return
}
// Else we try to parse the response error message
@ -552,12 +549,18 @@ export default defineComponent({
const response = await parser.parseStringPromise(upload.response?.data)
const message = response['s:message'][0] as string
if (typeof message === 'string' && message.trim() !== '') {
// Unfortunatly, the server message is not translated
// The server message is also translated
showError(this.t('files', 'Error during upload: {message}', { message }))
return
}
} catch (error) {}
// Finally, check the status code if we have one
if (status !== 0) {
showError(this.t('files', 'Error during upload, status code {status}', { status }))
return
}
showError(this.t('files', 'Unknown error during upload'))
},

4
dist/files-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long