[pleroma#36] Add upload errors
This commit is contained in:
parent
fb5261b926
commit
ba188eddab
5 changed files with 14 additions and 2 deletions
|
@ -21,6 +21,10 @@ const mediaUpload = {
|
|||
uploadFile (file) {
|
||||
const self = this
|
||||
const store = this.$store
|
||||
if (file.size > store.state.instance.uploadlimit) {
|
||||
self.$emit('upload-failed', 'upload_error_file_too_big')
|
||||
return
|
||||
}
|
||||
const formData = new FormData()
|
||||
formData.append('media', file)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue