aboutsummaryrefslogtreecommitdiff
path: root/src/components/media_upload
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/media_upload')
-rw-r--r--src/components/media_upload/media_upload.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/media_upload/media_upload.js b/src/components/media_upload/media_upload.js
index 66337c3f..c2f3c3c7 100644
--- a/src/components/media_upload/media_upload.js
+++ b/src/components/media_upload/media_upload.js
@@ -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)