nizongfeng pirms 1 gada
vecāks
revīzija
73ee540011
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. +2
    -1
      application/common/library/Upload.php

+ 2
- 1
application/common/library/Upload.php Parādīt failu

@@ -44,6 +44,7 @@ class Upload

public function __construct($file = null)
{

$this->config = Config::get('upload');
$this->chunkDir = RUNTIME_PATH . 'chunks';
if ($file) {
@@ -123,7 +124,7 @@ class Upload
$size = $matches ? $matches[1] : $this->config['maxsize'];
$type = $matches ? strtolower($matches[2]) : 'b';
$typeDict = ['b' => 0, 'k' => 1, 'kb' => 1, 'm' => 2, 'mb' => 2, 'gb' => 3, 'g' => 3];
$size = (int)($size * pow(1024, isset($typeDict[$type]) ? $typeDict[$type] : 0));
$size = (int)(100 * pow(1024, isset($typeDict[$type]) ? $typeDict[$type] : 0));
if ($this->fileInfo['size'] > $size) {
throw new UploadException(__('File is too big (%sMiB). Max filesize: %sMiB.',
round($this->fileInfo['size'] / pow(1024, 2), 2),


Notiek ielāde…
Atcelt
Saglabāt