mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: remove client side maximum filesize check
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user