Skip to content

Commit

Permalink
Show error when upload fails
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
  • Loading branch information
marcoambrosini committed Feb 20, 2020
1 parent 9b778bd commit 31437e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/NewMessageForm/NewMessageForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<script>
import axios from '@nextcloud/axios'
import AdvancedInput from './AdvancedInput/AdvancedInput'
import { getFilePickerBuilder } from '@nextcloud/dialogs'
import { getFilePickerBuilder, showError } from '@nextcloud/dialogs'
import { generateOcsUrl } from '@nextcloud/router'
import { postNewMessage } from '../../services/messagesService'
import Quote from '../Quote'
Expand Down Expand Up @@ -292,7 +292,8 @@ export default {
try {
await client.putFileContents(`/files/${userId}/` + files[i].name, files[i])
} catch (exception) {
console.debug('Error while uploading file' + exception)
console.debug('Error while uploading file:' + exception)
showError(t('spreed', 'Error while uploading file'))
}
}
},
Expand Down

0 comments on commit 31437e5

Please sign in to comment.