dever 3 年之前
父節點
當前提交
61a3621c6c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/File.php

+ 2 - 2
lib/File.php

@@ -16,11 +16,11 @@ class File
             $file = str_replace('{uploadYun}', '', $source);
         } elseif (strstr($source, 'http')) {
             $host = parse_url($source);
-            $file = $host['path'];
+            $file = ltrim($host['path'], '/');
         }
 
         $temp = explode('/', $file);
-        $key = $temp[1];
+        $key = $temp[0];
         $config = Dever::load('upload/lib/config')->get($key);
         if ($config) {
             if ($config['save_type'] >= 2 && $config['yun']) {