mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-12 17:16:18 +02:00
Files Manager Improvements - Maximum upload file size message - added #94
This commit is contained in:
@ -236,6 +236,7 @@ class FilesmanagerAdmin extends Backend
|
|||||||
->assign('forbidden_types', $forbidden_types)
|
->assign('forbidden_types', $forbidden_types)
|
||||||
->assign('image_types', $image_types)
|
->assign('image_types', $image_types)
|
||||||
->assign('site_url', $site_url)
|
->assign('site_url', $site_url)
|
||||||
|
->assign('upload_max_filesize', FilesmanagerAdmin::uploadSize())
|
||||||
->assign('files_path', $files_path)
|
->assign('files_path', $files_path)
|
||||||
->assign('fileuploader', array(
|
->assign('fileuploader', array(
|
||||||
'uploadUrl' => $site_url.'/admin/index.php?id=filesmanager&path='.$path,
|
'uploadUrl' => $site_url.'/admin/index.php?id=filesmanager&path='.$path,
|
||||||
@ -273,4 +274,13 @@ class FilesmanagerAdmin extends Backend
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Upload Size
|
||||||
|
*/
|
||||||
|
public static function uploadSize()
|
||||||
|
{
|
||||||
|
return Number::byteFormat(min(Number::convertToBytes(ini_get('upload_max_filesize')),
|
||||||
|
Number::convertToBytes(ini_get('post_max_size'))));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
Form::hidden('csrf', Security::token())
|
Form::hidden('csrf', Security::token())
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<div class="col-md-6">
|
<div class="col-md-10">
|
||||||
<div class="fileupload fileupload-new fileupload-controls" data-provides="fileupload">
|
<div class="fileupload fileupload-new fileupload-controls" data-provides="fileupload">
|
||||||
<button class="btn btn-default btn-file"><span class="fileupload-new"><?php echo __('Select file', 'filesmanager'); ?></span><span class="fileupload-exists"><?php echo __('Change', 'filesmanager'); ?></span><input type="file" name="file" /></button>
|
<button class="btn btn-default btn-file"><span class="fileupload-new"><?php echo __('Select file', 'filesmanager'); ?></span><span class="fileupload-exists"><?php echo __('Change', 'filesmanager'); ?></span><input type="file" name="file" /></button>
|
||||||
<?php
|
<?php
|
||||||
@ -29,9 +29,11 @@
|
|||||||
<div id="fuPlaceholder" class="upload-file-pholder"><?php echo __('Drop File Here', 'filesmanager'); ?></div>
|
<div id="fuPlaceholder" class="upload-file-pholder"><?php echo __('Drop File Here', 'filesmanager'); ?></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="fileInfo" class="upload-file-info"></div>
|
<div id="fileInfo" class="upload-file-info"></div>
|
||||||
|
<div class="btn btn-link">
|
||||||
|
Maximum upload file size: <?php echo $upload_max_filesize; ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<button class="btn btn-primary" data-toggle="modal" data-target="#createNewDirectory">
|
<button class="btn btn-primary" data-toggle="modal" data-target="#createNewDirectory">
|
||||||
<?php echo __('Create New Directory', 'filesmanager'); ?>
|
<?php echo __('Create New Directory', 'filesmanager'); ?>
|
||||||
|
Reference in New Issue
Block a user