diff --git a/app/javascript/src/javascripts/uploader.vue b/app/javascript/src/javascripts/uploader.vue
index bc7ad3bc3..fadeff4f4 100644
--- a/app/javascript/src/javascripts/uploader.vue
+++ b/app/javascript/src/javascripts/uploader.vue
@@ -11,6 +11,10 @@
+
+ The file you are trying to upload is too large. Maximum allowed is {{this.maxFileSize / (1024*1024) }} MiB.
+ Check out
the Supported Formats for more information.
+
File:
self.maxFileSize;
if (file.type.match('video/webm'))
self.setPreviewVideo(src);
else if (file.type.match('application/x-shockwave-flash'))
@@ -410,6 +414,7 @@
}
function updateFilePreview() {
+ this.fileToLarge = false;
if (this.$refs['post_file'] && this.$refs['post_file'].files[0])
updatePreviewFile.call(this);
else
@@ -561,7 +566,10 @@
error: '',
duplicateId: 0,
- descrLimit: window.uploaderSettings.descrLimit
+ descrLimit: window.uploaderSettings.descrLimit,
+
+ maxFileSize: window.uploaderSettings.maxFileSize,
+ fileToLarge: false,
};
},
mounted() {
@@ -826,7 +834,7 @@
},
preventUpload: function () {
return this.sourceWarning || this.badDirectURL || this.notEnoughTags
- || this.invalidRating;
+ || this.invalidRating || this.fileToLarge;
},
duplicatePath: function () {
return `/posts/${this.duplicateId}`;
diff --git a/app/views/uploads/new.html.erb b/app/views/uploads/new.html.erb
index 540a847f0..60a95f6d0 100644
--- a/app/views/uploads/new.html.erb
+++ b/app/views/uploads/new.html.erb
@@ -42,6 +42,7 @@
allowRatingLock: <%= CurrentUser.is_privileged?.to_json %>,
allowUploadAsPending: <%= CurrentUser.can_upload_free?.to_json %>,
descrLimit: <%= Danbooru.config.post_descr_max_size %>,
+ maxFileSize: <%= Danbooru.config.max_file_size %>,
};
Danbooru.Uploader.init();
<% end -%>
diff --git a/docker/default.conf.template b/docker/default.conf.template
index e5d75a2a2..8703582dc 100644
--- a/docker/default.conf.template
+++ b/docker/default.conf.template
@@ -4,7 +4,7 @@ server {
root /app/public;
index index.html;
access_log off;
- client_max_body_size 35m;
+ client_max_body_size 100m;
location /stylesheets {
expires max;
break;