mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2025-01-17 14:18:17 +01:00
make upload chunk size configureable (#967)
nginx supports only 1MB per default
This commit is contained in:
parent
200d9d6d49
commit
1eed63cf1b
@ -111,6 +111,10 @@ $sticky_navbar = true;
|
||||
// memory_limit, upload_max_filesize, post_max_size
|
||||
$max_upload_size_bytes = 5000000000; // size 5,000,000,000 bytes (~5GB)
|
||||
|
||||
// chunk size used for upload
|
||||
// eg. decrease to 1MB if nginx reports problem 413 entity too large
|
||||
$upload_chunk_size_bytes = 2000000; // chunk size 2,000,000 bytes (~2MB)
|
||||
|
||||
// Possible rules are 'OFF', 'AND' or 'OR'
|
||||
// OFF => Don't check connection IP, defaults to OFF
|
||||
// AND => Connection must be on the whitelist, and not on the blacklist
|
||||
@ -144,6 +148,9 @@ if (is_readable($config_file)) {
|
||||
// max upload file size
|
||||
define('MAX_UPLOAD_SIZE', $max_upload_size_bytes);
|
||||
|
||||
// upload chunk size
|
||||
define('UPLOAD_CHUNK_SIZE', $upload_chunk_size_bytes);
|
||||
|
||||
// private key and session name to store to the session
|
||||
if ( !defined( 'FM_SESSION_ID')) {
|
||||
define('FM_SESSION_ID', 'filemanager');
|
||||
@ -1335,7 +1342,7 @@ if (isset($_GET['upload']) && !FM_READONLY) {
|
||||
<script>
|
||||
Dropzone.options.fileUploader = {
|
||||
chunking: true,
|
||||
chunkSize: 2000000, // chunk size 2,000,000 bytes (~2MB)
|
||||
chunkSize: <?php echo UPLOAD_CHUNK_SIZE; ?>,
|
||||
forceChunking: true,
|
||||
retryChunks: true,
|
||||
retryChunksLimit: 3,
|
||||
|
Loading…
x
Reference in New Issue
Block a user