FIX: remove client side maximum filesize check

This commit is contained in:
Régis Hanol
2015-08-21 12:19:35 +02:00
parent c27cefd595
commit 07d6bb8d31
4 changed files with 2 additions and 28 deletions

View File

@ -51,16 +51,6 @@ test("ensures an authorized upload", function() {
ok(bootbox.alert.calledWith(I18n.t('post.errors.upload_not_authorized', { authorized_extensions: extensions })));
});
test("prevents files that are too big from being uploaded", function() {
Discourse.User.resetCurrent(Discourse.User.create());
var image = { name: "image.png", size: 11 * 1024 * 1024 };
Discourse.User.currentProp("trust_level", 1);
sandbox.stub(bootbox, "alert");
not(validUpload([image]));
ok(bootbox.alert.calledWith(I18n.t('post.errors.file_too_large', { max_size_kb: 10 * 1024 })));
});
var imageSize = 10 * 1024;
var dummyBlob = function() {
@ -77,8 +67,6 @@ var dummyBlob = function() {
test("allows valid uploads to go through", function() {
Discourse.User.resetCurrent(Discourse.User.create());
Discourse.User.currentProp("trust_level", 1);
Discourse.SiteSettings.max_image_size_kb = 15;
Discourse.SiteSettings.max_attachment_size_kb = 1;
sandbox.stub(bootbox, "alert");
// image