ソースを参照

修复分片上传未检测目录

Karson 5 年 前
コミット
9f04fcdb66
1 ファイル変更3 行追加0 行削除
  1. 3 0
      application/common/library/Upload.php

+ 3 - 0
application/common/library/Upload.php

@@ -248,6 +248,9 @@ class Upload
         $destDir = RUNTIME_PATH . 'chunks';
         $fileName = $chunkid . "-" . $chunkindex . '.part';
         $destFile = $destDir . DS . $fileName;
+        if (!is_dir($destDir)) {
+            @mkdir($destDir, 0755, true);
+        }
         if (!move_uploaded_file($this->file->getPathname(), $destFile)) {
             throw new UploadException(__('Chunk file write error'));
         }