mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
admin_settings: Change maxfilesize to max_file_upload_size.
Renamed maxfilesize to max_file_upload_size for consistency. Related to #12152.
This commit is contained in:
@@ -830,7 +830,7 @@ function verify_filedrop_payload(payload) {
|
||||
assert.equal(payload.url, '/json/user_uploads');
|
||||
assert.equal(payload.fallback_id, 'file_input');
|
||||
assert.equal(payload.paramname, 'file');
|
||||
assert.equal(payload.maxfilesize, 512);
|
||||
assert.equal(payload.max_file_upload_size, 512);
|
||||
assert.equal(payload.data.csrfmiddlewaretoken, 'fake-csrf-token');
|
||||
assert.deepEqual(payload.raw_droppable, ['text/uri-list', 'text/plain']);
|
||||
assert.equal(typeof payload.drop, 'function');
|
||||
@@ -888,7 +888,7 @@ run_test('initialize', () => {
|
||||
global.csrf_token = 'fake-csrf-token';
|
||||
|
||||
var filedrop_in_compose_checked = false;
|
||||
page_params.maxfilesize = 512;
|
||||
page_params.max_file_upload_size = 512;
|
||||
$("#compose").filedrop = function (payload) {
|
||||
verify_filedrop_payload(payload);
|
||||
test_raw_file_drop(payload.rawDrop);
|
||||
|
||||
@@ -6,7 +6,9 @@ set_global('navigator', {
|
||||
userAgent: 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)',
|
||||
});
|
||||
set_global('i18n', global.stub_i18n);
|
||||
set_global('page_params', { });
|
||||
set_global('page_params', {
|
||||
max_file_upload_size: 25,
|
||||
});
|
||||
set_global('csrf_token', { });
|
||||
global.patch_builtin('window', {
|
||||
bridge: false,
|
||||
@@ -96,7 +98,7 @@ run_test('upload_error', () => {
|
||||
var msg_prefix = 'translated: ';
|
||||
var msg_1 = 'File upload is not yet available for your browser.';
|
||||
var msg_2 = 'Unable to upload that many files at once.';
|
||||
var msg_3 = '"foobar.txt" was too large; the maximum file size is 25MiB.';
|
||||
var msg_3 = '"foobar.txt" was too large; the maximum file size is 25MB.';
|
||||
var msg_4 = 'Sorry, the file was too large.';
|
||||
var msg_5 = 'An unknown error occurred.';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user