diff options
| author | X3STeNLiTE <xestenlite@gmail.com> | 2020-04-08 22:53:54 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-09 01:53:54 +1000 |
| commit | 20bf93c86d7453d4ac1bdaf6bd2679f49d5951e9 (patch) | |
| tree | 083c965025efc01bc864b69bc3f47c0828daf85a /static | |
| parent | cb8d61538dac417f3534558e864e9982616c2010 (diff) | |
fix hard-coded frontend max_upload_size validation (#20)
Diffstat (limited to 'static')
| -rw-r--r-- | static/upload.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/static/upload.js b/static/upload.js index 468cae0..95b121d 100644 --- a/static/upload.js +++ b/static/upload.js @@ -1,8 +1,9 @@ // common variables +let configMaxUploadSize = window['MAX_UPLOAD_SIZE']; let iBytesUploaded = 0 let iBytesTotal = 0 let iPreviousBytesLoaded = 0 -let iMaxFilesize = 104857600 // 100MB +let iMaxFilesize = configMaxUploadSize ? (+configMaxUploadSize) : (100 * 1024 * 1024); // 100MB let timer = 0 let uploadInProgress = 'n/a' let isProcessing = false |
