From 43bb5f32458b15dcba31b16a400b5945807a0a31 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 28 Nov 2015 16:42:45 -0800 Subject: [PATCH] Take max file size data from script tag. --- src/Posting/QR.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index d590b8d8e..2b1705ed5 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -494,9 +494,8 @@ QR = QR.max_width = +match_max?[1] or 10000 QR.max_height = +match_max?[2] or 10000 - QR.max_size = +($('input[name=MAX_FILE_SIZE]')?.value or '0') - scriptData = Get.scriptData() + QR.max_size = if (m = scriptData.match /\bmaxFilesize *= *(\d+)\b/) then +m[1] else 4194304 QR.max_size_video = if (m = scriptData.match /\bmaxWebmFilesize *= *(\d+)\b/) then +m[1] else QR.max_size QR.max_comment = if (m = scriptData.match /\bcomlen *= *(\d+)\b/) then +m[1] else 2000